Mike Braden
11/08/2025, 7:43 PMkapa.ai
11/08/2025, 7:43 PMvalues.yaml. However, it's important to note that there are multiple environment variables for different job types (e.g., replication, check, discover, spec). Setting only the general JOB_MAIN_CONTAINER_* variables may not affect all job types. To ensure your replication jobs (which handle syncs) have higher memory, set the following in your values.yaml under `global.env_vars`: yaml global: env_vars: JOB_MAIN_CONTAINER_MEMORY_REQUEST: "2Gi" JOB_MAIN_CONTAINER_MEMORY_LIMIT: "4Gi" # You may also want to set CPU values JOB_MAIN_CONTAINER_CPU_REQUEST: "1" JOB_MAIN_CONTAINER_CPU_LIMIT: "2" # Optionally, set for other job types as well: SYNC_JOB_MAIN_CONTAINER_MEMORY_REQUEST: "2Gi" SYNC_JOB_MAIN_CONTAINER_MEMORY_LIMIT: "4Gi" # ...and so on for CHECK, DISCOVER, SPEC, SIDECAR, etc. This approach ensures that the correct resource limits are applied to the pods responsible for your syncs. If you only set the general job resource values, some job types (like check/discover) may still use cluster defaults, which can lead to OOM errors. For more details and a full list of variables, see the discussion and example here: [Github Issue #48816](https://github.com/airbytehq/airbyte/issues/48816). ### 2. Why is the OOM error not detected as a sync failure? There are known issues where Airbyte syncs may appear as "successful" in the UI even if the underlying pod was OOMKilled or failed for other reasons. This is often due to how errors are (or are not) propagated from the pod/container level up to the Airbyte UI and job status. Users have reported that OOM errors in the logs do not always result in a failed sync status, which is a recognized problem in the community ([Github Issue #68104](https://github.com/airbytehq/airbyte/issues/68104)). You should always check the pod logs for OOMKilled events if you suspect resource issues, as the UI may not always reflect the true job status. ### Debugging To confirm your resource settings are being picked up, check the job logs in the Airbyte UI. You should see log lines like: Launching replication pod: replication-job-... with containers: [source] ... resources: ResourceRequirements(... limits={memory=2Gi, ...}) This confirms the memory limits are being applied as expected. If not, revisit your values.yaml and ensure the correct environment variables are set for the job type in question ([Configuring Connector Resources - Debugging](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources#debugging)). --- Summary: - Set memory/CPU requests and limits for replication jobs in values.yaml under global.env_vars using the appropriate environment variables. - OOM errors may not always be reflected as sync failures in the UI; always check pod logs for the real status. - For more details and troubleshooting, refer to the linked documentation and issues above.Mike Braden
11/10/2025, 2:39 PMCONTAINER_CPU_LIMIT and CONTAINER_CPU_REQUEST) or memory (CONTAINER_MEMORY_LIMIT and CONTAINER_MEMORY_REQUEST) appear to be:
CHECK_
DISCOVER_
JOB_MAIN_
SIDECAR_MAIN
There does not appear to be those controls for SYNC_JOB_MAIN_ as kapa.ai indicates. There are, however, JOB_SOURCE_DECLARATIVE_MANIFEST_KUBE_NODE_SELECTORS
and
JOB_SOURCE_DECLARATIVE_MANIFEST_KUBE_RUNTIME_CLASS_NAME which could affect these containers if you have a special node pool for them.Mike Braden
11/10/2025, 2:44 PMglobal:
env_vars:
JOB_MAIN_CONTAINER_MEMORY_REQUEST: "4Gi"
JOB_MAIN_CONTAINER_MEMORY_LIMIT: "8Gi"
JOB_MAIN_CONTAINER_CPU_REQUEST: "1"
JOB_MAIN_CONTAINER_CPU_LIMIT: "2"
and then running a helm upgrade fails with:
Error: UPGRADE FAILED: failed to create patch: The order in patch list:
[map[name:JOB_MAIN_CONTAINER_CPU_LIMIT value:2] map[name:JOB_MAIN_CONTAINER_CPU_LIMIT valueFrom:map[configMapKeyRef:map[key:JOB_MAIN_CONTAINER_CPU_LIMIT name:airbyte-airbyte-env]]] map[name:JOB_MAIN_CONTAINER_CPU_REQUEST value:1] map[name:JOB_MAIN_CONTAINER_MEMORY_LIMIT value:8Gi] map[name:JOB_MAIN_CONTAINER_MEMORY_REQUEST value:4Gi] map[name:JOB_MAIN_CONTAINER_MEMORY_REQUEST valueFrom:map[configMapKeyRef:map[key:JOB_MAIN_CONTAINER_MEMORY_REQUEST name:airbyte-airbyte-env]]]]
doesn't match $setElementOrder list:
followed by a very long list of env vars in the configmap, including the ones I am trying to patch. Should these be set at the global level or in the env_vars setting for each deployment?kapa.ai
11/10/2025, 2:44 PMkapa.ai
11/10/2025, 2:45 PMabctl and Helm chart upgrades related to environment variable patch ordering. ## The Problem The error you're seeing (failed to create patch: The order in patch list doesn't match $setElementOrder list) occurs when Helm tries to patch Kubernetes Deployments with environment variables that have conflicting definitions—specifically, when the same environment variable appears both as a direct value and as a valueFrom (referencing a ConfigMap). This creates a patch ordering conflict that Helm cannot resolve. According to the [troubleshooting documentation](https://docs.airbyte.com/platform/deploying-airbyte/troubleshoot-deploy#failed-to-create-patch-order-in-patch-list), this error is a known issue (referenced in [Github #114](https://github.com/airbytehq/abctl/pull/114)) and is currently being fixed. It commonly occurs when you run abctl local install and then subsequently run abctl local install --low-resource-mode, or when upgrading with conflicting environment variable definitions. The same type of error is reported in [Github Issue #60918](https://github.com/airbytehq/airbyte/issues/60918) and [Github Issue #65129](https://github.com/airbytehq/airbyte/issues/65129), where users encounter patch failures due to duplicate or conflicting environment variable definitions during Helm upgrades. ## Recommended Approach Based on the [Helm chart V2 upgrade documentation](https://docs.airbyte.com/platform/deploying-airbyte/chart-v2-community#update-your-valuesyaml-file), the correct way to set these resource values in Helm chart V2 is not via global.env_vars, but rather via the dedicated Helm values paths: yaml global: workloads: resources: mainContainer: cpu: request: "1" limit: "2" memory: request: "4Gi" limit: "8Gi" The documentation explicitly maps the old environment variables to the new Helm chart V2 equivalents: - JOB_MAIN_CONTAINER_CPU_REQUEST → global.workloads.resources.mainContainer.cpu.request - JOB_MAIN_CONTAINER_CPU_LIMIT → global.workloads.resources.mainContainer.cpu.limit - JOB_MAIN_CONTAINER_MEMORY_REQUEST → global.workloads.resources.mainContainer.memory.request - JOB_MAIN_CONTAINER_MEMORY_LIMIT → global.workloads.resources.mainContainer.memory.limit Using the proper Helm values paths instead of env_vars should avoid the patch ordering conflict, as these values are handled differently by the chart templates. ## If the Issue Persists If you continue to encounter this error after switching to the correct Helm values format, the issue may be related to existing ConfigMap state from a previous installation. In that case, you may need to clean up the existing deployment state before upgrading. However, the knowledge sources do not provide explicit instructions for this scenario beyond noting that the issue is being fixed. --- Summary: - Use global.workloads.resources.mainContainer.* paths in your values.yaml instead of setting these as environment variables in global.env_vars. - This is the correct approach for Helm chart V2 and should avoid the patch ordering conflict you're experiencing.