<@U04S8PLJWMT> I have set up a source and destinat...
# ask-ai
h
@kapa.ai I have set up a source and destination, everything seems to be working fine, my syncs are completing without an issue, however no records are moved. I am connecting a source: MongoDB with a destination: Redshift
k
If your Airbyte sync between MongoDB and Redshift completes successfully but no records are moved, there are several possible causes based on the knowledge sources: 1. No Data Emitted from Source The sync may be running, but the MongoDB source is not emitting any records. This can happen if: - The source collection is empty. - The sync configuration (such as filters, start date, or selected collections) does not match any data. - There are schema or data type issues (e.g., inconsistent
_id
types in a collection) that prevent data extraction. - The MongoDB cluster is not supported (e.g., not a replica set, or using an unsupported tier in Atlas) or there are SSL/TLS issues. [See connector limitations](https://docs.airbyte.com/integrations/sources/mongodb-v2/mongodb-v2-troubleshooting#connector-limitations). 2. Records Extracted but Not Loaded There are cases where records are extracted from MongoDB, but none are loaded into Redshift. This can be due to: - Schema mismatches or issues with the destination connector. - Data being written only to Airbyte's raw tables (e.g.,
_airbyte_raw_*
) and not to the final tables, which can be a normal part of Airbyte's loading process. Check if your data appears in these raw tables in Redshift. [See similar Redshift issues](https://discuss.airbyte.io/t/843). 3. Oplog/Change Stream Issues If you are using incremental syncs, ensure your MongoDB Oplog is large enough and the sync frequency is within the Oplog retention window. Otherwise, you may miss changes or get "invalid resume token" errors, resulting in no data being synced. [See Oplog limitations](https://docs.airbyte.com/integrations/sources/mongodb-v2/mongodb-v2-troubleshooting#connector-limitations). 4. Connection and Cluster Issues The logs may show successful connection to the MongoDB cluster, but if the cluster is not a supported type (e.g., not a replica set, or using a self-signed certificate), no data will be extracted or loaded. [See supported clusters](https://docs.airbyte.com/integrations/sources/mongodb-v2/mongodb-v2-troubleshooting#connector-limitations). What to check: - Confirm your MongoDB collections have data and the correct schema. - Ensure you are selecting the correct collections and sync modes in Airbyte. - Check the Airbyte logs for messages about records emitted, committed, or any warnings/errors. - Look for data in the
_airbyte_raw_*
tables in Redshift. - Verify your MongoDB cluster meets the connector requirements (replica set, SSL/TLS, supported Atlas tier, etc.). If after these checks you still see no records moved, please review your Airbyte logs for any warnings or errors related to schema, connection, or data extraction. If you see "recordsEmitted=0" or "recordsCommitted=0" in the logs, it means no data was actually transferred, and you should focus on the source configuration and data presence. If you need more specific troubleshooting, please provide relevant log excerpts from your Airbyte sync attempts. [Connector Limitations - MongoDB](https://docs.airbyte.com/integrations/sources/mongodb-v2/mongodb-v2-troubleshooting#connector-limitations)
h
@kapa.ai Inside Redshift I see no data besides the airbyte_internal schema which has a table __airbyte_destination_state_ Connecting to MongoDB seems fine, connecting to Redshift seems fine. Inside the kube cluster I can see the job is pending kubectl logs replication-job-8-attempt-0 -n airbyte-abctl Defaulted container "orchestrator" out of: orchestrator, source, destination, init (init)
k
A message from kapa.ai
Based on the information in your question and the provided knowledge sources, here are the key points and possible causes for your issue: 1. airbyte_internal Schema Only If you only see the airbyte_internal schema (specifically the __airbyte_destination_state_ table) in Redshift and no user data tables, it means that Airbyte has not successfully written any data to your destination schema. This typically indicates that either: - No records are being extracted from MongoDB, or - The sync is not progressing past the initial state, possibly due to a job or infrastructure issue. 2. Job Pending in Kubernetes You mentioned that the job is "pending" in your Kubernetes cluster. This is a strong indicator that the sync job has not actually started running, which would explain why no data appears in Redshift. Common reasons for a job to remain pending include: - Insufficient resources (CPU, memory) available in the cluster. - Issues with pod scheduling, such as taints, node selectors, or affinity rules. - Problems with pulling the required Docker images. The logs you referenced (from the orchestrator container) may not show the actual sync progress if the source and destination containers have not started. You should check the status of all containers in the pod and look for events with:
Copy code
kubectl describe pod <pod-name> -n <namespace>
This will show you if there are resource or scheduling issues. 3. No Data in Redshift If the sync job is not running, no data will be moved, and only Airbyte's internal state tables will be present. This is consistent with your observation. What to do next: - Check the pod status and events using
kubectl describe pod <pod-name> -n <namespace>
to identify why the job is pending. - Ensure your Kubernetes cluster has enough resources and that there are no issues with image pulls or scheduling. - Once the job starts running, monitor the logs for the source and destination containers for any extraction or loading errors. Summary: Your issue is most likely due to the Airbyte sync job not starting (pending state in Kubernetes), which prevents any data from being moved to Redshift. There is no indication in the knowledge sources of a Redshift or MongoDB connector-specific issue that would cause this exact symptom without job execution. Focus on resolving the Kubernetes job scheduling issue first. If you need more detailed troubleshooting, please provide the output of
kubectl describe pod <pod-name> -n <namespace>
and any error messages from the pod events. The knowledge sources do not contain more specific troubleshooting steps for this exact scenario, but similar issues have been reported when jobs hang or do not start due to Kubernetes resource or configuration problems, not connector misconfiguration<sup>[Redshift Destination Hanging](https://discuss.airbyte.io/t/4574)</sup>.
h
@kapa.ai it seems the replication jobs that spin up are just stuck in pending. And when checking the logs it returns
Defaulted container "orchestrator" out of: orchestrator, source, destination, init (init)
k
A message from kapa.ai
When Airbyte replication jobs are stuck in the "Pending" state in Kubernetes, and the logs only show
Defaulted container "orchestrator" out of: orchestrator, source, destination, init (init)
, this typically means that the pod has not started running any of its containers yet. This is a Kubernetes scheduling issue, not an Airbyte application-level error. Common causes and troubleshooting steps from the knowledge sources: 1. Resource Constraints: The most frequent cause is insufficient resources (CPU, memory) available in your Kubernetes cluster. If there aren’t enough resources to schedule the pod, it will remain in Pending. - Check your node resource usage and limits. - Review your Airbyte deployment’s resource requests and limits. 2. Pod Scheduling Issues: There may be taints, node selectors, or affinity/anti-affinity rules preventing the pod from being scheduled. - Use
kubectl describe pod <pod-name> -n <namespace>
to see detailed scheduling events and errors. 3. Image Pull Issues: If Kubernetes cannot pull the required Docker images for the containers, the pod may remain pending. - Check for image pull errors in the pod events. 4. General Kubernetes Issues: Other cluster-level issues (e.g., node pressure, network problems) can also cause pods to remain pending. Relevant knowledge source examples: - Similar issues have been reported where jobs hang or do not start due to Kubernetes resource or configuration problems, not connector misconfiguration. The advice is to check pod status and events for more details and ensure the cluster has enough resources to schedule the pods [Redshift Destination Hanging](https://discuss.airbyte.io/t/4574), [Syncs getting stuck](https://discuss.airbyte.io/t/3797), [Destination, orchestrator, and source pod all stuck in terminating](https://discuss.airbyte.io/t/2545). What you should do next: - Run:
Copy code
kubectl describe pod <pod-name> -n <namespace>
and look for the "Events" section at the bottom. This will tell you exactly why the pod is pending (e.g., "Insufficient memory", "Failed to pull image", "NodeSelector does not match any nodes", etc.). - Address the specific issue reported in the events (e.g., add more resources, fix image pull secrets, adjust scheduling rules). Summary: Your Airbyte jobs are stuck in Pending due to a Kubernetes-level scheduling issue. The logs you see are normal for a pod that hasn't started any containers yet. Check the pod events for the root cause and resolve any resource or scheduling constraints in your cluster. If you need further help, please share the output of
kubectl describe pod <pod-name> -n <namespace>
for more targeted advice.
h
@kapa.ai it retuned Warning FailedScheduling 7m57s default-scheduler 0/1 nodes are available: 1 Insufficient cpu. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod. Warning FailedScheduling 2m37s default-scheduler 0/1 nodes are available: 1 Insufficient cpu. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod. I have this deployed inside an EC2 with 4vCPUs and 8GB of RAM, is that not enough?
k
A message from kapa.ai
Your Kubernetes pod is stuck in Pending because there is not enough CPU available on your node: >
0/1 nodes are available: 1 Insufficient cpu.
According to Airbyte's official recommendations, you should start with at least a mid-sized cloud instance (e.g., 4 or 8 cores) and tune instance size to your workload. However, the actual resource requirements depend on the number of concurrent syncs and the resource requests/limits configured for your Airbyte jobs and connectors. Each sync job can require significant resources, especially if the default or configured CPU requests are high. If your pod requests more CPU than is available on the node, it will remain pending until resources are freed or the node is scaled up. What to do: - Check your Airbyte job and connector resource requests/limits in your
values.yaml
file. You may need to lower them if they are set too high for your node size. - Alternatively, increase the available CPU in your cluster by scaling up your EC2 instance or adding more nodes. For example, you can adjust the job resource requests/limits like this in your `values.yaml`:
Copy code
yaml global:   jobs:     resources:       limits:         cpu: 250m         memory: 500Mi       requests:         cpu: 75m         memory: 150Mi
[See Scaling Airbyte and Configuring Connector Resources](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources) [Scaling Airbyte After Installation](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte) Summary: Your current instance (4 vCPUs, 8GB RAM) may be enough for small workloads, but if your job resource requests are high or you run multiple syncs, it may not be sufficient. Lower the resource requests or increase your node size to resolve the scheduling issue.
h
@kapa.ai I've increased the instance size and the sync worked. Now I am trying to migrate more data from a mongoDB everything at the logging level seems to only
INFO
however it's stuck again in sync starting, I already jumped to a 16vCPU 32GB RAM instance
k
A message from kapa.ai
If your Airbyte sync is stuck at "sync starting" even after increasing your instance size to 16 vCPUs and 32GB RAM, and the logs only show
INFO
level messages without progress, here are the most relevant considerations based on the knowledge sources: 1. Resource Exhaustion Is Unlikely With 16 vCPUs and 32GB RAM, you should have sufficient resources for most syncs, unless you are running a very large number of concurrent jobs or your connector resource requests/limits are set unusually high. However, if you have many connections or very large tables, Airbyte can still consume significant resources, and overhead can become an issue, especially with many concurrent syncs or large numbers of tables per connection [Airbyte taking too much resources and Time](https://discuss.airbyte.io/t/995). 2. Job Stuck in "Starting" If the sync is stuck at "starting" and not progressing, this can be due to: - Pending pods (as before, check with
kubectl get pods
and
kubectl describe pod <pod-name>
). - Internal Airbyte orchestration issues, such as unavailable pods or jobs not being scheduled due to resource requests/limits or cluster configuration [Scaling Airbyte After Installation](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte). - Too many concurrent syncs or high MAX_SYNC_WORKERS settings, which can overwhelm the system and cause jobs to remain in a queued or starting state [Scaling Airbyte After Installation](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte). 3. Connector or Data Issues If the MongoDB source or Redshift destination has issues (e.g., schema problems, unsupported MongoDB cluster configuration, or network issues), the sync may hang without clear error messages. However, these usually produce warnings or errors in the logs, not just
INFO
messages. 4. What to Check Next - Pod Status: Ensure all relevant Airbyte pods (orchestrator, source, destination) are running and not pending or crashing. - Resource Requests/Limits: Review your
values.yaml
for job and connector resource settings. If these are too high, even a large node may not be able to schedule all pods. - Concurrent Sync Limits: Check your MAX_SYNC_WORKERS and related settings. Lowering these can help if you have many connections or jobs [Scaling Airbyte After Installation](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte). - Logs: Look for any signs of progress or errors beyond just
INFO
messages. If logs are not progressing past "starting," it often means the job is not actually running. 5. If Still Stuck - Try running a sync with a smaller subset of data or fewer tables to see if the issue is related to data volume or schema complexity. - If possible, restart the Airbyte server and try again, as sometimes orchestration issues can be resolved by a fresh start. Summary: With your current resources, the most likely causes are either too many concurrent jobs, high resource requests/limits, or a cluster scheduling issue. Double-check your pod status and Airbyte resource settings. If the problem persists, try reducing the number of concurrent syncs or the data volume per sync to isolate the issue. If you need more targeted help, please provide the output of
kubectl get pods -n <namespace>
and
kubectl describe pod <pod-name> -n <namespace>
for the stuck job, as well as any non-INFO log lines if available. If the logs and pod status do not reveal the issue, the knowledge sources do not provide further specific troubleshooting steps for a sync stuck at "starting" with only
INFO
logs.
h
@kapa.ai all pods are up and running, none fail, when selecting only a single field from my schema, that gets migrated. Could it be that I am requesting too much data to be transferred? should I wait more? but it seems that nothing happens anymore as I see a spike in the EC2 usage, pretty low around 20% but then the CPU lowers to around 1%
k
A message from kapa.ai
Based on the knowledge sources, your observation—that syncing a single field works, but syncing the full schema results in the job appearing stuck with low CPU usage—suggests that the volume or complexity of the data being requested may be overwhelming the sync process. Key points from the documentation and community discussions: - Large Data Volumes Can Cause Stalls: Airbyte jobs can struggle or appear to hang when syncing very large tables or schemas, especially if the source contains many fields or large documents. This is a known challenge, and there are open discussions about breaking large syncs into smaller batches to improve reliability and resume-ability, but this is not yet implemented ([Break long and large data syncs into multiple small syncs](https://github.com/airbytehq/airbyte/issues/13783)). - Resource Usage Patterns: A spike in CPU followed by a drop to very low usage often indicates that the job has either completed its main processing (but failed to emit data due to a bottleneck) or is stuck waiting for an operation to finish (such as a large data transfer, transformation, or a timeout). However, if you see no progress in logs and no data in the destination, it is likely the job is not making progress. - Connector and Memory Limits: The MongoDB source worker reads up to 10,000 records in memory, and if your documents are large or your schema is complex, this can require significant RAM (e.g., 0.5MB per row × 10,000 rows = 5GB RAM). If the job is not failing but also not progressing, it could be hitting a soft resource or processing limit ([Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale)). - No Explicit Timeout or Progress Guidance: The knowledge sources do not specify how long you should wait for a large sync, nor do they provide a clear indication of when a sync is "too large" to complete. However, community reports indicate that very large syncs (hundreds of GBs or more) can hang or fail without clear errors ([Sync appears to be getting cancelled on its own when handling large amounts of data](https://discuss.airbyte.io/t/2921)). What you can do: - Try Syncing in Smaller Batches: If possible, reduce the number of fields or collections synced at once, or split your syncs into smaller jobs. This is the most reliable workaround for large or complex schemas. - Monitor Logs and Resource Usage: Continue to monitor the Airbyte logs for any warnings or errors, and keep an eye on resource usage. If the job remains idle for an extended period with no progress, it is unlikely to recover on its own. - Consider Connector Limitations: Be aware of the MongoDB connector's limitations regarding document size, schema complexity, and memory usage ([Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale)). Summary: Yes, requesting too much data or too many fields at once can cause Airbyte syncs to hang or stall, even if the system resources are not fully utilized. The best practice, according to the knowledge sources, is to reduce the scope of each sync and avoid very large, all-at-once migrations until more robust batching or checkpointing features are available in Airbyte. If you continue to experience issues, you may need to further break down your syncs or monitor for any connector-specific errors that might appear in the logs as you adjust your configuration.