Ляшик Іван
12/08/2025, 7:21 AMFailed to connect to airbyte-workload-api-server-svc:8007 (Connection refused)
• No exit code found. exitCode.txt does not exist
In the logs it looks like the sync crashes in the middle of the process, and the source container does not manage to write the exitCode.txt file before termination.
The data size per sync is approximately:
• 3.7M records emitted (~379 MB total)
• 3 streams (around 1M, 1.58M and 1.126M records)
• The sync runs for ~4 minutes before failing.
❓ Questions for Support
Could you please help me understand the root cause and how to resolve this issue?
1. What could cause the Workload Heartbeat Error?
2. Specifically, why would the workload be unable to connect to airbyte-workload-api-server-svc:8007 (Connection refused)?
3. Why does the workload container fail to create exitCode.txt?
4. This seems to indicate the container crashes abruptly rather than exiting gracefully.
5. Could this problem be related to insufficient resources (RAM/CPU) on the workload container or the workload-api-server?
6. If so, what are the recommended resource requirements for handling large syncs (~4M records / ~400 MB)?
7. Are there any known issues in Airbyte where the Workload API Server loses connection during high-volume syncs?
8. What additional logs or metrics would you need from my environment to further diagnose the issue?
9. (pods logs, describe output, node metrics, etc.)
10. Do you have recommended approaches for optimizing large syncs?
11. For example:
◦ Increasing workload / heartbeat timeouts
◦ Tuning CPU/RAM for workloads or API server
◦ Splitting the sync into smaller batches
◦ Using the new Worker mode or other scaling strategieskapa.ai
12/08/2025, 7:22 AMairbyte-workload-api-server-svc:8007? The docs explain that Airbyte’s job system (workloads) launches pods for syncs, and Temporal (and related services) maintain multiple DB connections and manage job state and heartbeats. [[Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale)] From the available information, likely causes include: - Workload API Server pod not running / restarting / crashlooping → the workload pod tries to heartbeat to airbyte-workload-api-server-svc:8007 and gets Connection refused because there is no healthy backend pod behind the service. - Network / service routing issues in the cluster (e.g., service misconfiguration, DNS, or network policy) → the service exists but is not reachable from the workload pod. - Resource pressure on the node running the API server → the API server pod is OOM-killed or evicted, briefly disappearing and causing heartbeats to fail. The docs also note that Temporal can open more DB connections than expected if SQL_MAX_IDLE_CONNS and SQL_MAX_CONNS are not tuned, which can contribute to instability under load. [[Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale)] However, there is no explicit documentation in the sources that directly ties “Workload Heartbeat Error” to a specific root cause. --- ### 3–4. Why does exitCode.txt not exist / container crashes abruptly? There is a closely related open GitHub issue where large/long-running syncs stall and the logs show: text java.lang.IllegalStateException: No exit code found. at io.airbyte.workers.internal.ContainerIOHandle.getExitCode(ContainerIOHandle.kt:98) at io.airbyte.workers.internal.LocalContainerAirbyteSource.getExitValue(LocalContainerAirbyteSource.kt:89) This is exactly the “No exit code found” situation you describe: the worker expects an exit code file but it’s missing. [[S3 data lake issue](https://github.com/airbytehq/airbyte/issues/56926)] In that issue, the failure happens after a long-running sync with millions of records and several GB of data, and the implication is that the source container did not exit cleanly (or the exit code file could not be read) even though a lot of data had already been processed. [[S3 data lake issue](https://github.com/airbytehq/airbyte/issues/56926)] So, based on that: - The missing exitCode.txt is consistent with an abrupt termination of the source container (OOM kill, node eviction, or crash), or - A timeout / internal error in the worker that prevents it from reading or writing the exit code file. The knowledge sources do not provide a definitive single root cause, only that this is a known failure mode on large syncs. --- ### 5–6. Could this be resource-related? What resources are recommended? The scaling docs emphasize that: - The source worker is usually the main memory consumer, because it buffers up to 10,000 records in memory. For large rows, this can require several GB of RAM. [[Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale)] - They recommend starting with 4–8 cores and then tuning instance size to your workload. [[Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale)] - For Kubernetes, you should ensure the cluster can schedule up to 2 x <number-of-possible-concurrent-connections> pods (since each sync uses two workers). [[Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale)] There are also multiple forum threads where: - Large syncs or many concurrent syncs lead to non-explicit failures, and users mitigate them by increasing memory for job pods (JOB_MAIN_CONTAINER_MEMORY_REQUEST / jobs.resources.requests.memory) and sometimes upgrading Airbyte. [[Sync failing 143](https://discuss.airbyte.io/t/589); [Large sync fails](https://discuss.airbyte.io/t/782); [Too many concurrent syncs](https://discuss.airbyte.io/t/3856)] - Exit code 143 and similar symptoms are often associated with OOM kills or resource pressure, and the suggested remediation is to increase memory limits/requests. [[Source 143 custom](https://discuss.airbyte.io/t/2291); [Sync failing 143](https://discuss.airbyte.io/t/589)] Given your volume (~3.7M records / ~379 MB total) and ~4-minute runtime, this is not extremely large, but if: - Rows are wide, or - Multiple syncs run concurrently, or - The node is already under pressure, then insufficient memory or CPU on the workload pod or node is a plausible cause of abrupt container termination and missing exitCode.txt. The docs do not give a precise “X GB per Y records” formula beyond the 10,000-record buffer example, so I cannot state an exact recommended RAM/CPU for your case. [[Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale)] --- ### 7. Known issues with lost connection / high-volume syncs? The knowledge sources show: - A known issue where destination pods disappear before the exit code can be retrieved, causing errors when the worker tries to read the exit code. [[Pod exit code issue](https://discuss.airbyte.io/t/2421)] - An open issue where large/long-running syncs stall and then report “No exit code found”, as mentioned above. [[S3 data lake issue](https://github.com/airbytehq/airbyte/issues/56926)] However, there is no explicit mention in the provided sources of a specific bug where the Workload API Server itself loses connection during high-volume syncs. The symptoms you describe are consistent with the general class of “large sync / long-running job / container exit code missing” issues, but I cannot point to a documented, named bug for the Workload API Server specifically. --- ### 8–9. What additional logs/metrics would help? Based on the patterns in the forum and GitHub issues, the following are typically requested and would be useful: - Full sync logs for a failing job (source, destination, and worker logs). - Kubernetes pod events and status: - kubectl describe pod <workload-pod> - kubectl describe pod <airbyte-workload-api-server-pod> - Look for OOMKilled, Evicted, or restart counts. - Logs from the Workload API Server pod around the time of failure. - Node-level metrics (CPU, memory, disk pressure) for the nodes running: - The workload pods - The Workload API Server - Temporal / database metrics if you suspect connection exhaustion (e.g., max connections reached). The knowledge sources don’t list a formal checklist, but these are exactly the kinds of artifacts requested in similar threads. [[Sync failing 143](https://discuss.airbyte.io/t/589); [Too many concurrent syncs](https://discuss.airbyte.io/t/3856); [Pod exit code issue](https://discuss.airbyte.io/t/2421)] --- ### 10–11. Recommended approaches for optimizing large syncs From the docs and forum threads, the following approaches are recommended for large or many concurrent syncs: 1. Increase memory for sync jobs (workloads) - On Kubernetes, increase jobs.resources.requests.memory (and possibly limits) so that source workers have enough RAM. [[Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale); [Large sync fails](https://discuss.airbyte.io/t/782)] - In older setups, this is done via JOB_MAIN_CONTAINER_MEMORY_REQUEST / JOB_MAIN_CONTAINER_MEMORY_LIMIT. [[Source 143 custom](https://discuss.airbyte.io/t/2291); [Sync failing 143](https://discuss.airbyte.io/t/589)] 2. Ensure sufficient cluster capacity and avoid oversubscription - Make sure the cluster can schedule 2 x <concurrent-connections> pods and that nodes have enough CPU/RAM. [[Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale)] - Avoid running too many large syncs concurrently; users have seen non-explicit failures when running many jobs at once. [[Too many concurrent syncs](https://discuss.airbyte.io/t/3856)] 3. Tune Temporal DB connection settings if needed - If you suspect DB connection exhaustion, review SQL_MAX_IDLE_CONNS and SQL_MAX_CONNS for Temporal, as Temporal may create more connections than expected. [[Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale)] 4. Upgrade Airbyte and connectors - Several users resolved large-sync issues after upgrading Airbyte and connectors, as newer versions include memory and stability improvements. [[Large sync fails](https://discuss.airbyte.io/t/782)] 5. Reduce per-sync volume where possible - While not explicitly documented as a best practice, forum discussions imply that splitting very large syncs (e.g., by streams or by time windows) can help avoid long-running jobs that hit timeouts or resource limits. [[Large sync fails](https://discuss.airbyte.io/t/782); [Pod exit code issue](https://discuss.airbyte.io/t/2421)] The knowledge sources do not mention specific knobs for “workload heartbeat timeout” or a “new Worker mode” in detail, so I cannot give concrete values or steps for those. --- ### Summary - Your symptoms (Workload Heartbeat Error, connection refused to the Workload API Server, and missing exitCode.txt) are consistent with abrupt termination or instability of the workload or API server pods, often under heavier load. - There are known issues around large/long-running syncs where exit codes cannot be retrieved and jobs fail despite having processed a lot of data. [[Pod exit code issue](https://discuss.airbyte.io/t/2421); [S3 data lake issue](https://github.com/airbytehq/airbyte/issues/56926)] - The main actionable levers, based on the docs and forum, are: - Increase memory/CPU for job pods and ensure sufficient cluster capacity. - Limit concurrency of large syncs. - Check for OOM/restarts on workload and API server pods. - Consider upgrading Airbyte and connectors if you’re on an older version. If you can share (outside this interface) the full job logs plus kubectl describe and logs for the workload and API server pods around a failing run, that would be the next step support would typically take to pinpoint whether this is OOM, a timeout, or a specific bug.Ляшик Іван
12/08/2025, 7:23 AMkapa.ai
12/08/2025, 7:23 AMkapa.ai
12/08/2025, 7:23 AMairbyte-workload-api-server-svc:8007 (connection refused)? The docs don’t mention this service explicitly, but “connection refused” at a Kubernetes service usually means: - No healthy pod is backing the service (pod crashed, OOMKilled, or not yet ready). - Network/service misconfiguration (less common if other jobs work). Given the scaling guidance, under‑provisioned nodes or too many concurrent syncs can cause pods to fail scheduling or be evicted, which would make the service temporarily unreachable. [[Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale)] The knowledge sources do not explicitly document this exact failure mode for the Workload API Server, so this remains an inference. --- ### 3–4. Why does exitCode.txt not exist / does this indicate an abrupt crash? There is a closely related open issue where large/long‑running syncs stall and then fail with: > java.lang.IllegalStateException: No exit code found. > at ContainerIOHandle.getExitCode / LocalContainerAirbyteSource.getExitValue [[S3 data lake issue](https://github.com/airbytehq/airbyte/issues/56926)] This is the same symptom: the worker expects an exit code file but cannot find it. Another documented failure pattern is when the worker cannot retrieve a pod’s exit code because the pod was not correctly created or is gone: > Cannot find pod while trying to retrieve exit code. This probably means the Pod was not correctly created. [[Pod exit code issue](https://discuss.airbyte.io/t/2421)] Both point to the same class of problem: - The source/destination container does not exit cleanly (crash, OOM kill, eviction), or - The worker cannot access the pod or its filesystem to read the exit code. So yes, the missing exitCode.txt is consistent with an abrupt termination rather than a graceful exit. --- ### 5. Could this be related to insufficient RAM/CPU? The docs emphasize that: - The source worker is usually the main memory consumer, because it buffers up to 10,000 records in memory; large row sizes can require several GB of RAM. [[Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale)] - Sync jobs are the main scaling concern; each sync uses two workers (read + write), and the cluster must have enough resources to schedule all job pods. [[Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale)] Forum threads show that: - Exit code 143 / killed processes and unexplained sync failures often correlate with insufficient memory, and the recommended fix is to increase JOB_MAIN_CONTAINER_MEMORY_REQUEST / job memory. [[Sync failing 143](https://discuss.airbyte.io/t/589)] - Large syncs that intermittently fail have been mitigated by increasing job memory requests and upgrading Airbyte/connectors. [[Large sync fails](https://discuss.airbyte.io/t/782)] So, while your volume (~3.7M records / ~379 MB) is moderate, if: - Rows are wide, - Multiple syncs run concurrently, or - Nodes are already under pressure, then insufficient RAM/CPU on the workload pods or the node is a plausible cause of abrupt container termination and missing exitCode.txt. The docs do not explicitly confirm this for the Workload API Server, but resource pressure is a common root cause in similar cases. --- ### 6. Recommended resources for large syncs (~4M records / ~400 MB) The docs don’t give a formula per record count, but they do recommend: - Start with a 4–8 core instance and tune up as needed. [[Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale)] - Ensure enough memory for the source’s 10,000‑record buffer; e.g., a 0.5 MB average row size would need ~5 GB RAM just for that buffer. [[Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale)] - On Kubernetes, ensure the cluster can schedule up to 2 × <number-of-possible-concurrent-connections> pods. [[Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale)] For job pods, you can set global defaults in `values.yaml`: yaml global: jobs: resources: limits: cpu: # e.g. 250m memory: # e.g. 500m requests: cpu: # e.g. 75m memory: # e.g. 150m [[Scaling Airbyte](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#connector-cpu--memory-settings)] And/or use JOB_MAIN_CONTAINER_MEMORY_REQUEST / JOB_MAIN_CONTAINER_MEMORY_LIMIT for instance‑wide job containers. [[Configuring resources](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources)] The sources do not specify exact values for “4M records / 400 MB”, so any concrete numbers beyond these examples would be guesswork. --- ### 7. Known issues where the Workload API Server loses connection during high‑volume syncs? The provided sources show: - A known pattern where the worker cannot find a pod or exit code for long‑running syncs. [[Pod exit code issue](https://discuss.airbyte.io/t/2421); [S3 data lake issue](https://github.com/airbytehq/airbyte/issues/56926)] - Failures under high concurrency (many syncs at once) leading to non‑explicit errors and stuck jobs. [[Too many concurrent syncs](https://discuss.airbyte.io/t/3856)] However, there is no explicit mention in these sources of a specific bug where the Workload API Server itself loses connection during high‑volume syncs. So I cannot confirm a documented, named issue for that component specifically. --- ### 8–9. What additional logs/metrics would help? Based on similar issues in the docs and forum, the most useful artifacts would be: - Full job logs (source, destination, and worker) for a failing attempt. [[Sync failing 143](https://discuss.airbyte.io/t/589); [Large sync fails](https://discuss.airbyte.io/t/782)] - Kubernetes diagnostics: - kubectl describe pod for: - The workload pod(s) for the failing job - The airbyte-workload-api-server pod - Look for OOMKilled, Evicted, restart counts, and events. - Logs from the Workload API Server pod around the failure time. - Node metrics (CPU, memory, disk pressure) for nodes running: - Workload pods - Workload API Server - If you suspect DB/Temporal pressure: DB connection counts vs. SQL_MAX_CONNS / SQL_MAX_IDLE_CONNS. [[Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale)] The knowledge sources don’t provide a formal checklist, but these are exactly what are requested in similar threads. --- ### 10–11. Recommended approaches for optimizing large syncs From the docs and forum: 1. Increase job resources (RAM/CPU) - Use global.jobs.resources in values.yaml to raise memory/CPU requests/limits for connector pods. [[Scaling Airbyte](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#connector-cpu--memory-settings)] - Or set JOB_MAIN_CONTAINER_MEMORY_REQUEST / JOB_MAIN_CONTAINER_MEMORY_LIMIT instance‑wide. [[Configuring resources](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources)] - Several users resolved large‑sync failures by increasing job memory. [[Large sync fails](https://discuss.airbyte.io/t/782); [Sync failing 143](https://discuss.airbyte.io/t/589)] 2. Control concurrency - Limit concurrent syncs via MAX_SYNC_WORKERS / MAX_CHECK_WORKERS (Helm v1) or worker.maxSyncWorkers / worker.maxCheckWorkers (Helm v2) to avoid overloading the cluster. [[Scaling Airbyte](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#concurrent-sync-limits)] - Users have seen non‑explicit failures when running many large jobs concurrently. [[Too many concurrent syncs](https://discuss.airbyte.io/t/3856)] 3. Ensure sufficient cluster capacity - Make sure the cluster can schedule 2 × <concurrent-connections> pods and has enough memory/disk per node (docs recommend at least 30 GB disk per node). [[Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale)] 4. Upgrade Airbyte and connectors - Large‑sync issues have been mitigated by upgrading Airbyte and connectors, which include performance and memory improvements. [[Large sync fails](https://discuss.airbyte.io/t/782)] 5. Reduce per‑sync volume where feasible - While not formalized as a best practice, splitting very large syncs (e.g., by streams or time windows) has helped in some reported cases. [[Large sync fails](https://discuss.airbyte.io/t/782)] The sources do not document specific knobs for “workload / heartbeat timeout” or a “new Worker mode” with concrete settings, so I can’t give precise instructions for those. --- ### Practical next steps (based on the docs) 1. Check for OOM / restarts on: - Workload pods for failing jobs - airbyte-workload-api-server pod via kubectl describe and pod logs. 2. Increase job memory (and possibly CPU) using global.jobs.resources or JOB_MAIN_CONTAINER_MEMORY_*, then re‑run the sync. 3. Reduce concurrency (via maxSyncWorkers) and re‑test to see if failures disappear when fewer jobs run in parallel. [[Scaling Airbyte](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#concurrent-sync-limits)] 4. If issues persist, collect: - Full job logs - Workload + API server pod logs and describe output - Node metrics and share them with Airbyte support or in a GitHub issue, referencing the “No exit code found” pattern. [[S3 data lake issue](https://github.com/airbytehq/airbyte/issues/56926)] Within the provided knowledge, this is as specific as we can be without inspecting your actual logs and cluster state.