Fabian Boerner
11/05/2025, 11:36 PMkapa.ai
11/05/2025, 11:37 PMclosing connection appears repeatedly). This pattern can significantly slow down syncs, especially when dealing with multiple streams. 2. Long-lived Instance Issues: The knowledge sources mention that [Clearing storage area in destination increasingly slow on long-lived airbyte instances](https://discuss.airbyte.io/t/3620) can occur, where performance degrades over time on Airbyte instances that have been running for extended periods. 3. Metadata Query Performance: The destination is repeatedly querying database metadata for each stream, which can be slow if: - The Postgres database has performance issues - There are network latency issues between Airbyte and Postgres - The database has many tables or complex schemas ## Troubleshooting Steps Based on similar issues in the knowledge sources, here are some suggestions: 1. Check Resource Allocation: The knowledge sources indicate that [allocating more memory to connections](https://discuss.airbyte.io/t/2416) can sometimes help with performance issues. 2. Monitor System Resources: Check your Airbyte instance's memory and CPU usage using docker stats to see if there are resource constraints, as suggested in [Long loading time](https://discuss.airbyte.io/t/2536). 3. Restart Airbyte Components: If your instance has been running for a long time, restarting the airbyte-server and airbyte-worker containers may help, as mentioned in the [Long loading time](https://discuss.airbyte.io/t/2536) discussion. 4. Check Postgres Performance: Since the bottleneck appears to be in the metadata retrieval phase, investigate your Postgres database performance, particularly for metadata queries. Unfortunately, the knowledge sources don't contain specific information about why one MongoDB to Postgres connection would be slower than others with the same destination. You may want to compare the number of streams, table structures, and data volumes between your connections to identify differences that could explain the performance disparity.Fabian Boerner
11/05/2025, 11:38 PMkapa.ai
11/05/2025, 11:38 PMkapa.ai
11/05/2025, 11:38 PM[ASYNC QUEUE INFO] Global: max: 1.8 GB, allocated: 10 MB (10.0 MB), %% used: 0.005425347222783638 This indicates that only 10 MB is being used out of the available memory, which is far below your 12 GB allocation. ## Key Observations According to the [Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale) documentation, the Source worker is typically the main memory consumer during syncs, as it reads up to 10,000 records in memory. However, your logs show the bottleneck is in the destination's metadata retrieval phase, not in the source reading or destination writing phases. The pattern in your logs shows: - Repeated metadata queries for each stream - Frequent connection opening and closing - Very low actual resource usage despite high allocation ## What This Suggests Since you've already allocated substantial resources (12 GB RAM and 3 CPUs) and the actual usage is minimal, the slowness is likely due to: 1. Database-side performance: The Postgres destination may be slow in responding to metadata queries 2. Network latency: Communication between Airbyte and the Postgres database 3. Database connection pool issues: The frequent connection opening/closing pattern suggests potential connection management inefficiencies The knowledge sources indicate that simply increasing JOB_MAIN_CONTAINER_MEMORY_REQUEST and similar variables [may not improve performance](https://discuss.airbyte.io/t/1842) if the bottleneck isn't resource-related, which appears to be your case. Unfortunately, the knowledge sources don't provide specific solutions for optimizing the metadata retrieval phase that's causing your slowdown. You may need to investigate the Postgres database performance and network connectivity between Airbyte and Postgres to identify the root cause.Fabian Boerner
11/05/2025, 11:39 PMkapa.ai
11/05/2025, 11:39 PMkapa.ai
11/05/2025, 11:40 PMdestination-postgres, you should "monitor your database's memory and CPU usage during your syncs. It is possible for your destination to 'lock up', and incur high usage costs with large sync volumes." 3. Scaling Considerations: The documentation notes that "when attempting to scale a postgres database to handle larger data volumes, scaling IOPS (disk throughput) is as important as increasing memory and compute capacity." ## What This Means for Your Setup Your logs show the destination is performing many sequential metadata queries with frequent connection opening and closing. With pgpool in front of your Postgres cluster, this pattern could be creating additional overhead in connection management and query routing. The knowledge sources don't provide specific guidance on optimizing Postgres destinations with pgpool configurations or multi-node setups. However, the repeated pattern of metadata queries in your logs suggests that the bottleneck is in how the destination connector interacts with your Postgres setup, rather than the raw resources available. Unfortunately, the knowledge sources don't contain specific solutions for optimizing metadata retrieval performance in multi-node Postgres setups with pgpool. The documentation primarily recommends using dedicated data warehouses like BigQuery, Snowflake, or Redshift for larger data volumes instead of Postgres.Fabian Boerner
11/05/2025, 11:41 PMkapa.ai
11/05/2025, 11:42 PMkapa.ai
11/05/2025, 11:42 PMFabian Boerner
11/05/2025, 11:44 PMkapa.ai
11/05/2025, 11:44 PMkapa.ai
11/05/2025, 11:44 PM0.0000533 of CPU. My writing pod is using around 163Mb and 0.00000717 of CPU. This is way below the values set with JOB_MAIN_CONTAINER_* values" The response clarified: "if the problem is with the pulling/sending data and not with memory changing that variable won't make much sense because you would already be having enough resources." Similarly, in [Optimized Postgres source connector performance](https://discuss.airbyte.io/t/1984), a user noted: > "I found even I distribute more resource to the container JOB_MAIN_CONTAINER_MEMORY_REQUEST there is no improvement. There are still some room of memories for postgres connector I wondering if the slowness is relate to the idel memory resource?" ## Understanding Memory Usage in Airbyte According to the [How memory request and limit works under the hood](https://discuss.airbyte.io/t/2214) discussion, memory usage depends on the connector type: - Source connectors: Read data in batches, and it's not possible to know the size of these batches before reading them - Destination connectors: Read records until they hit a batch size, currently set at 10k records The [Scaling Airbyte documentation](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale) explains that "the Source worker reads up to 10,000 records in memory." ## The Real Issue Your logs show the bottleneck is in the metadata retrieval phase of the destination connector, not in the data reading or writing phases. The connector is spending time querying database metadata and opening/closing connections repeatedly. This is a connector behavior issue, not a memory allocation issue. Unfortunately, the knowledge sources don't provide a way to force the connector to use more memory or to optimize the metadata retrieval pattern that's causing your slowdown. The low memory usage indicates the connector simply doesn't need more memory for the operations it's currently performing.Fabian Boerner
11/05/2025, 11:46 PMkapa.ai
11/05/2025, 11:46 PMkapa.ai
11/05/2025, 11:47 PMFabian Boerner
11/30/2025, 11:43 PMkapa.ai
11/30/2025, 11:43 PMkapa.ai
11/30/2025, 11:43 PMJOB_KUBE_NODE_SELECTORS to define default node selectors for sync jobs, and optionally override per job type with the job-specific vars. [[Jobs](https://docs.airbyte.com/platform/operator-guides/configuring-airbyte#jobs); [Jobs-specific](https://docs.airbyte.com/platform/operator-guides/configuring-airbyte#jobs-specific)] Example values.yaml (Helm chart v1): yaml workload-launcher: nodeSelector: type: static extraEnv: - name: JOB_KUBE_NODE_SELECTORS value: type=jobs - name: SPEC_JOB_KUBE_NODE_SELECTORS value: type=jobs - name: CHECK_JOB_KUBE_NODE_SELECTORS value: type=jobs - name: DISCOVER_JOB_KUBE_NODE_SELECTORS value: type=jobs In this setup: - All job pods (sync) default to nodes with label type=jobs via JOB_KUBE_NODE_SELECTORS. [[Multiple node groups 1.8](https://docs.airbyte.com/platform/1.8/enterprise-setup/scaling-airbyte#multiple-node-groups)] - SPEC/CHECK/DISCOVER jobs are explicitly pinned using their *_JOB_KUBE_NODE_SELECTORS overrides. [[Jobs-specific 1.8](https://docs.airbyte.com/platform/1.8/operator-guides/configuring-airbyte#jobs-specific)] Note: There was a known behavior where non-sync jobs did not fall back to JOB_KUBE_NODE_SELECTORS, requiring all SPEC_/CHECK_/DISCOVER_ env vars to be set explicitly. [[Forum node selectors](https://discuss.airbyte.io/t/4533)] --- ## 2. Helm chart v2 global config If you’re using Helm chart v2, you can configure job scheduling centrally: [[Multiple node groups 1.8](https://docs.airbyte.com/platform/1.8/enterprise-setup/scaling-airbyte#multiple-node-groups)] yaml global: jobs: kube: nodeSelector: type: jobs # default for sync jobs scheduling: check: nodeSelectors: type: jobs discover: nodeSelectors: type: jobs spec: nodeSelectors: type: jobs This makes all Airbyte job pods (sync, check, discover, spec) scheduled only on nodes labeled type=jobs. --- ## 3. Label your Kubernetes nodes Ensure your target nodes are labeled accordingly, e.g.: bash kubectl label nodes <node-name> type=jobs Then Airbyte job pods will only schedule on those nodes that match the selector. --- If you share which Helm chart version you’re using (v1 vs v2), I can show the exact snippet tailored to it.Fabian Boerner
11/30/2025, 11:45 PMkapa.ai
11/30/2025, 11:45 PMkapa.ai
11/30/2025, 11:45 PMyaml env: - name: JOB_KUBE_NODE_SELECTORS value: type=jobs - name: SPEC_JOB_KUBE_NODE_SELECTORS value: type=jobs - name: CHECK_JOB_KUBE_NODE_SELECTORS value: type=jobs - name: DISCOVER_JOB_KUBE_NODE_SELECTORS value: type=jobs Meaning: - JOB_KUBE_NODE_SELECTORS – default node selectors for sync jobs, and fallback for others. [[Jobs](https://docs.airbyte.com/platform/operator-guides/configuring-airbyte#jobs)] - SPEC_JOB_KUBE_NODE_SELECTORS, CHECK_JOB_KUBE_NODE_SELECTORS, DISCOVER_JOB_KUBE_NODE_SELECTORS – override per job type. [[Jobs-specific](https://docs.airbyte.com/platform/operator-guides/configuring-airbyte#jobs-specific)] Because the fallback from JOB_KUBE_NODE_SELECTORS to other job types was not working in some versions, explicitly setting all four variables is recommended. [[Forum node selectors](https://discuss.airbyte.io/t/4533); [Multiple node groups](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#multiple-node-groups)] ### 2. Label the target Kubernetes nodes Label the nodes you want to run jobs on: bash kubectl label node <node-name> type=jobs Now, all Airbyte job pods (sync, spec, check, discover) will only schedule onto nodes with type=jobs, regardless of whether you use Helm.Fabian Boerner
11/30/2025, 11:50 PMFabian Boerner
11/30/2025, 11:50 PMkapa.ai
11/30/2025, 11:50 PMkapa.ai
11/30/2025, 11:51 PM*_JOB_KUBE_NODE_SELECTORS variables must match Kubernetes node labels. Per the jobs configuration docs, these vars are defined as “one or more pod node selectors,” with each selector expressed as key=value and multiple pairs separated by commas. [[Jobs-specific](https://docs.airbyte.com/platform/operator-guides/configuring-airbyte#jobs-specific)] Example from the docs: text SPEC_JOB_KUBE_NODE_SELECTORS - Defines one or more pod node selectors for the spec job. Each k=v pair is separated by a `,`. For example: key1=value1,key2=value2 So if your nodes are labeled like: bash kubectl label node my-node role=airbyte-jobs environment=prod you would configure: bash SPEC_JOB_KUBE_NODE_SELECTORS=role=airbyte-jobs,environment=prod CHECK_JOB_KUBE_NODE_SELECTORS=role=airbyte-jobs,environment=prod DISCOVER_JOB_KUBE_NODE_SELECTORS=role=airbyte-jobs,environment=prod JOB_KUBE_NODE_SELECTORS=role=airbyte-jobs,environment=prodFabian Boerner
11/30/2025, 11:52 PMkapa.ai
11/30/2025, 11:52 PMkapa.ai
11/30/2025, 11:52 PMglobal.jobs.kube.* for all jobs (Helm v2). [[Multiple node groups 1.6](https://docs.airbyte.com/platform/1.6/enterprise-setup/scaling-airbyte#multiple-node-groups); [Chart v2 upgrade](https://docs.airbyte.com/platform/enterprise-setup/chart-v2-enterprise#update-your-valuesyaml-file)] Examples from Helm v1 Enterprise docs (note where the vars live): [[Multiple node groups 1.7](https://docs.airbyte.com/platform/1.7/enterprise-setup/scaling-airbyte#multiple-node-groups)] yaml workload-launcher: nodeSelector: type: static extraEnvs: - name: JOB_KUBE_NODE_SELECTORS value: type=jobs - name: SPEC_JOB_KUBE_NODE_SELECTORS value: type=jobs - name: CHECK_JOB_KUBE_NODE_SELECTORS value: type=jobs - name: DISCOVER_JOB_KUBE_NODE_SELECTORS value: type=jobs So, without Helm: - Identify the pod/container that plays the role of workload launcher / job orchestrator / worker in your deployment (the thing that submits the connector Kubernetes jobs). - Add these env vars to that pod’s spec: yaml env: - name: JOB_KUBE_NODE_SELECTORS value: type=jobs - name: SPEC_JOB_KUBE_NODE_SELECTORS value: type=jobs - name: CHECK_JOB_KUBE_NODE_SELECTORS value: type=jobs - name: DISCOVER_JOB_KUBE_NODE_SELECTORS value: type=jobs The docs don’t spell out non‑Helm deployment names, only the Helm components; I’m inferring that you must set them on the component responsible for launching jobs (the equivalent of workload-launcher), since that’s where they’re set in all documented examples.Fabian Boerner
12/01/2025, 12:14 AMkapa.ai
12/01/2025, 12:14 AMkapa.ai
12/01/2025, 12:14 AMJOB_KUBE_TOLERATIONS (and related) environment variables on the component that launches jobs (workload‑launcher / worker), so they get propagated to all Kubernetes Job pods. From the jobs configuration docs: [[Config jobs](https://docs.airbyte.com/platform/operator-guides/configuring-airbyte#jobs)] > JOB_KUBE_TOLERATIONS – Defines one or more Job pod tolerations. > Tolerations are separated by ;. > Each toleration contains k=v pairs mentioning some/all of key, effect, operator and value and separated by ,. ### 1. Define tolerations via env vars Example (for all sync jobs): yaml env: - name: JOB_KUBE_TOLERATIONS value: "key=node-group,operator=Equal,value=airbyte-workers,effect=NoSchedule" If you also want specific tolerations per job type (spec/check/discover), use the job‑specific env vars (same format): [[Config jobs](https://docs.airbyte.com/platform/operator-guides/configuring-airbyte#jobs)] yaml env: - name: JOB_KUBE_TOLERATIONS value: "key=node-group,operator=Equal,value=airbyte-workers,effect=NoSchedule" - name: SPEC_JOB_KUBE_TOLERATIONS value: "key=node-group,operator=Equal,value=airbyte-workers,effect=NoSchedule" - name: CHECK_JOB_KUBE_TOLERATIONS value: "key=node-group,operator=Equal,value=airbyte-workers,effect=NoSchedule" - name: DISCOVER_JOB_KUBE_TOLERATIONS value: "key=node-group,operator=Equal,value=airbyte-workers,effect=NoSchedule" In Helm v1 this is done via workload-launcher.extraEnv, and the same envs are used when configuring tolerations globally for jobs. [[Scaling multiple node groups](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#multiple-node-groups); [[Helm values snippet](https://github.com/airbytehq/airbyte/issues/49843)] > Example from the chart comments: > JOB_KUBE_TOLERATIONS: "key=airbyte-server,operator=Equals,value=true,effect=NoSchedule" [[Helm tolerations example](https://github.com/airbytehq/airbyte/issues/49843)] ### 2. Ensure your nodes are tainted accordingly Kubernetes will only schedule the job pods onto nodes whose taints match the tolerations you configured. bash kubectl taint nodes <node-name> node-group=airbyte-workers:NoSchedule ### 3. Notes / pitfalls from issues - Tolerations must include effect to be applied; users observed that omitting effect made them no‑op. [[Forum tolerations](https://discuss.airbyte.io/t/2153)] - When set correctly, tolerations are passed as pod‑level tolerations on the job pods; examples using this pattern are shown in real configs: [[EKS example](https://github.com/airbytehq/airbyte/issues/59730)] If you share how you deploy Airbyte (Helm vs raw manifests), I can show the exact YAML block for your setup.