:thread: Error troubleshooting
# ask-ai
v
🧡 Error troubleshooting
k
To troubleshoot thread-related errors in Airbyte, such as errors like
pthread_create failed (EAGAIN)
or
java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
, the following points from the knowledge sources are relevant: - These errors often indicate that the system or container has reached its thread or resource limits, even if overall memory usage appears low. This can happen due to OS-level thread limits, Docker/container resource constraints, or a resource leak in the Airbyte worker process. - In some reported cases, restarting the Airbyte worker resolves the issue temporarily, reducing the number of threads from tens of thousands back to normal levels (e.g., ~40 threads). This suggests a possible resource leak or runaway thread creation in the worker process. - Users have addressed this by increasing memory and thread limits at the OS or container level (e.g., using
ulimit
or adjusting Docker/Kubernetes resource settings). However, if the problem recurs, it may indicate a deeper issue such as a resource leak in Airbyte itself, which may require further investigation or reporting to the Airbyte team for a fix. - If you encounter this issue, consider monitoring thread usage (
docker stats
,
docker ps
, or OS-level tools), increasing resource limits, and restarting the worker as a temporary workaround. If the issue persists, gather logs and thread counts to share with the Airbyte community or support for further assistance. For more details and community discussion on this issue, see the relevant forum posts: - [MySQL to BigQuery connection failing - pthread_create failed (EAGAIN)](https://discuss.airbyte.io/t/1107) - [Resource leak in airbyte-worker](https://discuss.airbyte.io/t/2309) If you need further help, you can also reach out on the [Airbyte community channels](https://docs.airbyte.com/platform/next/community/getting-support).
v
@kapa.ai My jobs were running fine till yesterday but all of a sudden , they're failing and I'm getting below error in Airbyte logs : 2025-07-25 100008 platform INFO APPLY Stage: BUILD β€” (workloadId=11c41b3b-ae1f-4f35-aae4-56965cc4fb79_1753417800000_discover) 2025-07-25 100008 platform INFO APPLY Stage: CLAIM β€” (workloadId=11c41b3b-ae1f-4f35-aae4-56965cc4fb79_1753417800000_discover) 2025-07-25 100008 platform INFO Claimed: true for 11c41b3b-ae1f-4f35-aae4-56965cc4fb79_1753417800000_discover via API for d7829c15-1d9e-49c5-9bd4-684658bd6ddd 2025-07-25 100008 platform INFO APPLY Stage: LOAD_SHED β€” (workloadId=11c41b3b-ae1f-4f35-aae4-56965cc4fb79_1753417800000_discover) 2025-07-25 100008 platform INFO APPLY Stage: CHECK_STATUS β€” (workloadId=11c41b3b-ae1f-4f35-aae4-56965cc4fb79_1753417800000_discover) 2025-07-25 100008 platform INFO No pod found running for workload 11c41b3b-ae1f-4f35-aae4-56965cc4fb79_1753417800000_discover 2025-07-25 100008 platform INFO APPLY Stage: MUTEX β€” (workloadId=11c41b3b-ae1f-4f35-aae4-56965cc4fb79_1753417800000_discover) 2025-07-25 100008 platform INFO No mutex key specified for workload: 11c41b3b-ae1f-4f35-aae4-56965cc4fb79_1753417800000_discover. Continuing... 2025-07-25 100008 platform INFO APPLY Stage: LAUNCH β€” (workloadId=11c41b3b-ae1f-4f35-aae4-56965cc4fb79_1753417800000_discover) 2025-07-25 100008 platform INFO [initContainer] image: airbyte/workload-init-container:1.6.2 resources: ResourceRequirements(claims=[], limits={}, requests={}, additionalProperties={}) 2025-07-25 101312 platform ERROR Stage Pipeline Exception: io.airbyte.workload.launcher.pipeline.stages.model.StageError: io.airbyte.workers.exception.KubeClientException: Failed to create pod source-mysql-discover-216-0-cvzex. message: io.airbyte.workers.exception.KubeClientException: Failed to create pod source-mysql-discover-216-0-cvzex. stackTrace: [Ljava.lang.StackTraceElement;@73cc700f 2025-07-25 101312 platform INFO Attempting to update workload: 11c41b3b-ae1f-4f35-aae4-56965cc4fb79_1753417800000_discover to FAILED. 2025-07-25 101312 platform INFO Pipeline aborted after error for workload: 11c41b3b-ae1f-4f35-aae4-56965cc4fb79_1753417800000_discover. 2025-07-25 101313 platform INFO Starting async replication 2025-07-25 101313 platform INFO Creating workload 86f897e3-dfa7-4bea-b189-7f9949365dcc_216_0_sync 2025-07-25 101314 platform INFO APPLY Stage: BUILD β€” (workloadId=86f897e3-dfa7-4bea-b189-7f9949365dcc_216_0_sync) 2025-07-25 101314 platform INFO APPLY Stage: CLAIM β€” (workloadId=86f897e3-dfa7-4bea-b189-7f9949365dcc_216_0_sync) 2025-07-25 101314 platform INFO Claimed: true for 86f897e3-dfa7-4bea-b189-7f9949365dcc_216_0_sync via API for d7829c15-1d9e-49c5-9bd4-684658bd6ddd 2025-07-25 101314 platform INFO APPLY Stage: LOAD_SHED β€” (workloadId=86f897e3-dfa7-4bea-b189-7f9949365dcc_216_0_sync) 2025-07-25 101314 platform INFO APPLY Stage: CHECK_STATUS β€” (workloadId=86f897e3-dfa7-4bea-b189-7f9949365dcc_216_0_sync) 2025-07-25 101314 platform INFO No pod found running for workload 86f897e3-dfa7-4bea-b189-7f9949365dcc_216_0_sync 2025-07-25 101314 platform INFO APPLY Stage: MUTEX β€” (workloadId=86f897e3-dfa7-4bea-b189-7f9949365dcc_216_0_sync) 2025-07-25 101314 platform INFO Mutex key: 86f897e3-dfa7-4bea-b189-7f9949365dcc specified for workload: 86f897e3-dfa7-4bea-b189-7f9949365dcc_216_0_sync. Attempting to delete existing pods... 2025-07-25 101314 platform INFO Mutex key: 86f897e3-dfa7-4bea-b189-7f9949365dcc specified for workload: 86f897e3-dfa7-4bea-b189-7f9949365dcc_216_0_sync found no existing pods. Continuing... 2025-07-25 101314 platform INFO APPLY Stage: LAUNCH β€” (workloadId=86f897e3-dfa7-4bea-b189-7f9949365dcc_216_0_sync) 2025-07-25 101314 platform INFO flag context: Multi(contexts=[Connection(key=86f897e3-dfa7-4bea-b189-7f9949365dcc)]) 2025-07-25 101314 platform INFO [initContainer] image: airbyte/workload-init-container:1.6.2 resources: ResourceRequirements(claims=[], limits={memory=16Gi, cpu=8}, requests={memory=2Gi, cpu=1}, additionalProperties={}) 2025-07-25 101314 platform INFO Launching replication pod: replication-job-216-attempt-0 with containers: 2025-07-25 101314 platform INFO [source] image: airbyte/source-mysql:3.11.18 resources: ResourceRequirements(claims=[], limits={memory=16Gi, cpu=8}, requests={memory=2Gi, cpu=1}, additionalProperties={}) 2025-07-25 101314 platform INFO [destination] image: airbyte/destination-gcs:0.4.9 resources: ResourceRequirements(claims=[], limits={memory=16Gi, cpu=8}, requests={memory=2Gi, cpu=1}, additionalProperties={}) 2025-07-25 101314 platform INFO [orchestrator] image: airbyte/container-orchestrator:1.6.2 resources: ResourceRequirements(claims=[], limits={memory=16Gi, cpu=8}, requests={memory=2Gi, cpu=1}, additionalProperties={}) 2025-07-25 102618 platform ERROR Stage Pipeline Exception: io.airbyte.workload.launcher.pipeline.stages.model.StageError: io.airbyte.workers.exception.KubeClientException: Failed to create pod replication-job-216-attempt-0. message: io.airbyte.workers.exception.KubeClientException: Failed to create pod replication-job-216-attempt-0. stackTrace: [Ljava.lang.StackTraceElement;@ff28b3
k
A message from kapa.ai
Based on the logs you provided, your Airbyte jobs are failing at the pod creation stage with errors like:
Copy code
io.airbyte.workload.launcher.pipeline.stages.model.StageError: io.airbyte.workers.exception.KubeClientException: Failed to create pod ...
This type of error is commonly reported in Airbyte Kubernetes deployments and can be caused by several underlying issues. Here are the most relevant causes and troubleshooting steps from the knowledge sources: ### 1. Resource Limits or Quotas - If your cluster is low on resources (CPU, memory), or if there are strict resource quotas, new pods may fail to be scheduled or created. This is especially likely if you recently increased job concurrency or resource requests/limits. - Check your cluster's available resources and quotas. If you see pods stuck in Pending or not being created, this is a strong indicator. ### 2. Kubernetes Permissions or Service Account Issues - If Airbyte is configured to use a specific service account (e.g.,
airbyte-admin
) and that service account is missing or misconfigured, pod creation will fail with a forbidden or not found error. This can happen after changes to RBAC, service accounts, or namespace configuration. - Review your service account configuration and ensure the account exists and has the necessary permissions. See [this issue for a similar case](https://github.com/airbytehq/airbyte/issues/49938). ### 3. Pod Creation Timeouts or API Errors - Sometimes, the Kubernetes API may return timeouts or errors (e.g., 401 Unauthorized, 403 Forbidden, 422 Invalid) when Airbyte tries to create pods. This can be due to expired credentials, cluster API issues, or misconfigured secrets/volumes. - Check the Airbyte and Kubernetes event logs for more detailed error messages about why pod creation failed. For example, missing secrets or invalid volume mounts can cause failures ([example](https://discuss.airbyte.io/t/3823)). ### 4. Resource Configuration Not Being Respected - There are known issues where Airbyte jobs do not respect the resource requests/limits set in the Helm values, leading to pods being scheduled with default or incorrect resources, which can cause OOMKilled or scheduling failures. Sometimes, restarting the worker pods after changing resource configs helps apply the new settings ([example](https://github.com/airbytehq/airbyte/issues/42921)). ### 5. Cluster or Node Issues - If your cluster has node failures, taints, or network issues, pods may not be scheduled or created. Check the status of your nodes and the Kubernetes control plane. --- Recommended Next Steps: 1. Check Kubernetes Events: Run
kubectl get events -n <airbyte-namespace>
and
kubectl describe pod <failed-pod>
to get more details on why pod creation is failing. 2. Review Resource Usage: Ensure your cluster has enough free CPU and memory for the requested pod resources. 3. Check Service Account and RBAC: Make sure the service account Airbyte uses exists and has the correct permissions. 4. Review Recent Changes: If you recently changed resource configs, upgraded Airbyte, or changed cluster settings, try restarting the Airbyte worker pods to ensure new configs are picked up. 5. Look for Specific Error Messages: If you see errors like "forbidden: error looking up service account" or "invalid: missing secret", address those directly as described above. If you need more targeted help, please provide the output of
kubectl describe pod <failed-pod>
and any recent changes to your Airbyte or Kubernetes configuration. --- If the above steps do not resolve your issue, the knowledge sources do not contain more specific troubleshooting for your exact error, and you may need to reach out to the Airbyte community or support with detailed logs and configuration information.
v
@kapa.ai So we're getting : 2025-07-25 135056 platform ERROR Stage Pipeline Exception: io.airbyte.workload.launcher.pipeline.stages.model.StageError: io.airbyte.workers.exception.KubeClientException: Failed to create pod source-mysql-check-223-0-ymfmj. message: io.airbyte.workers.exception.KubeClientException: Failed to create pod source-mysql-check-223-0-ymfmj. stackTrace: [Ljava.lang.StackTraceElement;@1643ae But there is no pod as such with this name .
k
A message from kapa.ai
The error message:
Copy code
io.airbyte.workers.exception.KubeClientException: Failed to create pod source-mysql-check-223-0-ymfmj.
indicates that Airbyte attempted to create a Kubernetes pod for a job, but the pod was never successfully createdβ€”hence, you do not see a pod with that name in your cluster. This situation is consistent with several issues reported in the knowledge sources, where Airbyte fails at the pod creation step due to underlying Kubernetes or configuration problems. The absence of the pod means the failure happened before the pod could be scheduled or instantiated by Kubernetes. Common causes for this behavior include: - Kubernetes API errors or permission issues: For example, if the service account used by Airbyte is missing or lacks permissions, the Kubernetes API will reject the pod creation request, and no pod will appear. This is seen in cases where the error is "forbidden: error looking up service account" or "unauthorized" ([example](https://github.com/airbytehq/airbyte/issues/49938), [example](https://github.com/airbytehq/airbyte/issues/39512)). - Resource or quota constraints: If the cluster is out of resources or quotas are exceeded, the pod creation can fail before the pod is visible in the cluster ([example](https://github.com/airbytehq/airbyte/issues/44443)). - Configuration errors: Issues like duplicate imagePullSecrets, missing secrets, or invalid pod specs can cause the Kubernetes API to reject the pod creation ([example](https://github.com/airbytehq/airbyte/issues/52034)). What you should do: 1. Check Airbyte workload-launcher logs for more detailed error messages immediately before or after the error you posted. These often contain the specific Kubernetes API error (e.g., forbidden, unauthorized, invalid, etc.). 2. Check Kubernetes events (
kubectl get events -n <namespace>
) for any failed pod creation attempts or related errors. 3. Review your service account and RBAC configuration to ensure Airbyte has the necessary permissions. 4. Check for recent changes in your cluster, Airbyte configuration, or resource usage that might have triggered this issue. If the logs do not provide a more specific error message, the knowledge sources do not contain enough information to diagnose the exact root cause, but the above steps are the most common and relevant troubleshooting paths based on similar reported issues.