<@U04S8PLJWMT> Why orchestratror is so long ?
# ask-ai
j
@kapa.ai Why orchestratror is so long ?
k
The orchestrator in Airbyte can take a long time for several reasons, depending on the context of your syncs and environment: 1. High CPU Usage During Slow Syncs: When syncing from slow sources (like Mixpanel), the orchestrator pod can consume a lot of CPU, even when it appears to be waiting for messages. This is due to how the
BufferedReplicationWorker
handles message processing and locking, which can result in high CPU usage for the duration of the sync—even if the source is the bottleneck. This behavior has been observed and reported by users, especially for large or slow syncs, and is a known area for potential optimization in Airbyte's codebase. There is currently no built-in way to reduce this CPU usage without code changes or architectural improvements in Airbyte itself [[High orchestrator CPU during slow sync](https://github.com/airbytehq/airbyte/issues/37837)]. 2. Long Time Spent on Cleaning/Deleting Destination Paths: For some destinations (like S3), a significant portion of the sync time can be spent on cleaning or deleting paths, especially when using "Full Refresh | Overwrite" mode. In some cases, users have reported that up to 90% of the sync time is spent on this step, regardless of whether the destination is already empty. This can make the orchestrator appear to be "stuck" or running for a long time, even though the actual data transfer is quick [[Destination S3: long time to clean/delete s3 paths](https://github.com/airbytehq/airbyte/issues/26525)]. 3. Instance Age and Local Data Cleanup: On long-lived Airbyte instances, the "Clearing storage area in destination" step can become increasingly slow, sometimes taking hours. This slowdown can persist even if the destination bucket is manually emptied, suggesting that local data or preparation steps on the Airbyte instance itself may be the cause. Rebuilding the Airbyte environment can temporarily resolve this, but the issue may return as the instance ages [[Clearing storage area in destination increasingly slow](https://discuss.airbyte.io/t/3620)]. 4. Job Queuing and Resource Contention: If there are many jobs running or queued, or if the Airbyte instance is under-provisioned (not enough CPU/RAM), orchestrator jobs can be delayed or take longer to start and complete. This is especially true for environments with many frequent syncs or a large number of connections [[Is Marketo Sync Supposed to Take Hours?](https://discuss.airbyte.io/t/984)]. In summary, orchestrator slowness is often due to a combination of source/destination performance, Airbyte's internal job handling, and resource constraints. If you are experiencing consistently long orchestrator times, consider checking for known issues with your connectors, reviewing your instance's resource usage, and, if possible, upgrading to the latest Airbyte version for performance improvements.
j
@kapa.ai It stuck on thios
[orchestrator] image: airbyte/container-orchestrator:1.8.2 resources: ResourceRequirements(claims=[], limits={memory=2Gi, cpu=2}, requests={memory=2Gi, cpu=2}, additionalProperties={})
k
A message from kapa.ai
If your Airbyte sync is stuck at the step showing:
Copy code
[orchestrator] image: airbyte/container-orchestrator:1.8.2 resources: ResourceRequirements(claims=[], limits={memory=2Gi, cpu=2}, requests={memory=2Gi, cpu=2}, additionalProperties={})
this means the orchestrator pod is being launched, but the process is not progressing past this point. Based on the knowledge sources, here are the most common reasons and troubleshooting steps: 1. Resource Allocation Issues: If the orchestrator pod is stuck, it may be due to insufficient resources in your Kubernetes cluster. Even if you have set requests and limits, if the cluster cannot provide the requested resources (2Gi memory, 2 CPU), the pod may remain pending or not start properly. Check your cluster's available resources and node status. 2. Pod Not Being Created or Scheduled: Logs like
No pod found running for workload ...
indicate that Airbyte is waiting for the orchestrator pod to be scheduled and started, but Kubernetes is unable to do so. This can be due to resource constraints, taints, or other scheduling issues in your cluster [[All sync jobs hanging indefinitely](https://github.com/airbytehq/airbyte/issues/55812)]. 3. Resource Requirements Not Applied Properly: There have been reports that resource requirements are not always respected or applied to all job types (e.g., reset, check, discover jobs), which can cause pods to be denied by admission controllers or remain unscheduled [[Resource requirements are not applied when a reset is triggered](https://discuss.airbyte.io/t/1306)]. 4. Cluster Policies or Admission Webhooks: If your cluster enforces policies (e.g., via OPA) that require all pods to have resource requests/limits, and Airbyte does not set them for a particular job type, the pod creation may be denied [[Resource requirements are not applied when a reset is triggered](https://discuss.airbyte.io/t/1306)]. What you can do: - Check the Kubernetes events for the orchestrator pod to see if it is pending, unschedulable, or being denied. - Ensure your cluster has enough free resources to satisfy the orchestrator's requests. - Review your Airbyte and cluster configuration to confirm that all required resource environment variables are set for all job types (sync, check, discover, spec) [[Cannot use Airbyte on Kubernetes due to OOM when setting up connector](https://github.com/airbytehq/airbyte/issues/48816)]. - If you are using custom policies or admission controllers, verify that all Airbyte job pods have the required resource fields. If you need to debug further, Airbyte logs the resource requirements as part of the job logs, and you can use the Kubernetes dashboard or CLI to inspect pod status and events [[Configuring Connector Resources - Debugging](https://docs.airbyte.com/platform/next/operator-guides/configuring-connector-resources#debugging)]. If these steps do not resolve the issue, please provide the Kubernetes pod status and events for more targeted troubleshooting.