<@U04S8PLJWMT> my server and worker pods are resta...
# ask-ai
i
@kapa.ai my server and worker pods are restarting because of the load although i have autoscaling in place in my cluster.
k
If your Airbyte server and worker pods are restarting due to load, even with autoscaling enabled in your Kubernetes cluster, there are several key considerations and best practices highlighted in the Airbyte documentation: 1. Resource Requests and Limits: Ensure that your
values.yaml
is properly configured for CPU and memory requests/limits for each pod type. If your nodes are under high CPU or memory usage, you may need to increase the resources allocated to your pods or scale up your cluster nodes. If high requested resources are blocking new pods, but used resources are low, you can adjust the defaults in your `values.yaml`:
Copy code
yaml    jobs:      resources:        limits:          cpu: 250m          memory: 500m        requests:          cpu: 75m          memory: 150m
[Scaling Airbyte After Installation](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte)<br> 2. Concurrent Syncs and Worker Replicas: The number of concurrent syncs is a major driver of resource usage. Each sync requires multiple pods. You can limit the number of concurrent syncs and increase the number of worker replicas to better distribute the load:
Copy code
yaml    worker:      maxSyncWorkers: 5      replicaCount: 2    server:      replicaCount: 2
[Scaling Airbyte After Installation](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#high-availability) 3. Autoscaling Limitations: Kubernetes autoscaling (HPA) may not always react quickly enough to sudden spikes in job load, especially if resource requests/limits are not well-tuned. Also, Airbyte jobs can be resource-intensive and may require more aggressive scaling or larger node types. 4. Memory and Disk Recommendations: Start with mid-sized nodes (e.g., 4 or 8 cores) and at least 30GB disk per node. The source worker in sync jobs can be particularly memory-intensive, especially with large row sizes. Monitor and adjust as needed for your workload [What To Scale](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale). 5. DEBUG Logs: Make sure DEBUG logging is disabled in production. Leaving it on can overload the server pod and cause instability, especially under heavy load [DEBUG Logs](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#debug-logs). 6. Pod Failures and Stuck Jobs: If you see jobs stuck or pods failing, it may indicate under-provisioning. Increasing resource limits or reducing the number of concurrent jobs can help. Also, review logs for errors related to resource exhaustion or pod scheduling failures. 7. Graceful Scaling: There are known challenges with graceful scale-in/scale-out of worker pods in Airbyte, and some users have reported issues with autoscaling not behaving as expected. You may need to experiment with your autoscaler settings and consider manual intervention or more conservative scaling policies [Worker autoscale in k8s](https://github.com/airbytehq/airbyte/issues/27691). Summary: - Review and tune your resource requests/limits. - Limit concurrent syncs and increase worker/server replicas. - Disable DEBUG logs in production. - Monitor memory/disk usage and scale nodes as needed. - Be aware of autoscaling limitations and consider manual adjustments if necessary. If you continue to experience restarts, check pod logs for out-of-memory (OOM) or resource exhaustion errors, and consider increasing node size or further limiting concurrency. If you need more specific troubleshooting, please provide error logs or describe the pod failure events in more detail.
i
@kapa.ai any standard resource limits i can start with ?
k
A message from kapa.ai
There are no strict "standard" resource limits for Airbyte pods, as requirements depend heavily on your workload, connector types, and data volumes. However, the documentation and community examples provide some starting points you can use as a baseline and then tune based on your monitoring and needs. Example starting resource limits and requests:
Copy code
yaml # For connector jobs (in values.yaml) global:   edition: "enterprise"   jobs:     resources:       limits:         cpu: 250m         memory: 500Mi       requests:         cpu: 75m         memory: 150Mi
[Scaling Airbyte After Installation](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte) Community and example values for core Airbyte components:
Copy code
yaml worker:   resources:     limits:       cpu: 500m       memory: 1Gi     requests:       cpu: 200m       memory: 256Mi  server:   resources:     limits:       cpu: 1       memory: 6Gi     requests:       cpu: 1       memory: 4Gi
[Example from GitHub issue](https://github.com/airbytehq/airbyte/issues/60915) General recommendations: - Start with mid-sized nodes (e.g., 4 or 8 cores). - Allocate at least 30GB disk per node. - Monitor actual usage and adjust up or down as needed. - Some connectors (especially sources) may require significantly more memory, especially if handling large records or high volumes. Important: Always monitor CPU and memory usage after deployment and adjust these values to fit your actual workload. Under-provisioning can cause jobs to fail or pods to restart, while over-provisioning can waste resources and block scheduling of new pods. If you have specific connectors that are particularly resource-intensive, you may need to override these defaults for those jobs. For more details and best practices, see the official documentation on [scaling Airbyte](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte) and [what to scale](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale).
i
@kapa.ai what is the CPU 1 unit here ?
k
A message from kapa.ai
In Airbyte (and Kubernetes in general), a CPU value of
1
refers to one full CPU core. For example, setting
cpu: 1
means the container is allowed to use up to one full core of the underlying node's CPU. If you specify
cpu: 500m
, that means 0.5 of a CPU core (500 millicores). This is confirmed in Airbyte community discussions, where CPU requests and limits are expressed as a fraction of a single core. For example,
JOB_MAIN_CONTAINER_CPU_REQUEST=0.50
means 50% of a single core, and
JOB_MAIN_CONTAINER_CPU_LIMIT=0.50
also means 50% of a single core. The unit for CPU is either a whole number (for full cores) or a decimal/fraction (for partial cores) [How to specify CPU,MEMORY limit in .env](https://discuss.airbyte.io/t/1675). So, in summary: CPU: 1 = 1 full CPU core CPU: 0.5 = 50% of a CPU core CPU: 500m = 0.5 CPU core (millicores)
i
@kapa.ai can the pod cross the requests values for cpu and ram ?
k
A message from kapa.ai
Yes, in Kubernetes (and therefore in Airbyte deployments on Kubernetes), a pod can use more than its requested CPU and memory, but it cannot exceed its limit. - Requests: This is the minimum amount of CPU or memory guaranteed to the pod. The scheduler uses this value to decide on which node to place the pod. - Limits: This is the maximum amount of CPU or memory the pod is allowed to use. If the pod tries to use more than the limit, Kubernetes will throttle CPU usage or kill the pod if it exceeds the memory limit (resulting in an OOMKilled error). This behavior is standard for Kubernetes and is reflected in Airbyte’s documentation and community discussions. For example, if you set a request of
cpu: 200m
and a limit of
cpu: 500m
, the pod can use up to 500m CPU, but is only guaranteed 200m. For memory, if the pod exceeds its memory limit, it will be terminated by Kubernetes [Scaling Airbyte After Installation](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte). If you notice pods being killed or jobs failing, it may be because they are exceeding their memory limits, not just their requests. Monitoring and tuning these values is important for stable Airbyte operation.
i
@kapa.ai i dont understand even after multinode group deployment, where my server pods are separate - there is soemthing which is overwhelming them and they are restarting. the jobs pod are under a different node group, so they shouldn't be the reason why server pods are restarting
k
A message from kapa.ai
You are correct that, with a multi-node group setup, job-related pods (like connector pods) are scheduled on a separate node group from your static workloads (such as
server
pods). This design is intended to isolate resource spikes from sync jobs and protect the stability of your UI/API services [Multiple Node Groups](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#multiple-node-groups). However, even with this separation, your
server
pods can still be overwhelmed and restart for several reasons: 1. Excessive Logging (DEBUG logs): If
DEBUG
logs are enabled, the
server
pod can be overloaded by log volume, especially during high activity, leading to restarts. It is strongly recommended to turn off
DEBUG
logs in any non-testing environment, as this can prevent the server pod from operating normally [DEBUG Logs](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#debug-logs). 2. Resource Limits Too Low: If the resource limits (CPU/memory) for the
server
pod are set too low, the pod may be killed by Kubernetes when it exceeds those limits, regardless of node group separation. This can happen if the server is handling a high volume of API requests, metadata operations, or other background tasks. 3. Indirect Load from Job Activity: While job pods are on a separate node group, the
server
pod still coordinates and tracks all jobs. A high number of concurrent jobs can increase the load on the
server
pod (e.g., for job orchestration, status updates, and logging), potentially overwhelming it if not properly resourced. 4. Other Causes (e.g., Bugs, Memory Leaks): There may be bugs or memory leaks in the Airbyte server process itself, or issues with the underlying infrastructure, that cause restarts even when node groups are separated. What you can do: - Double-check that
DEBUG
logging is disabled. - Review and increase the resource requests/limits for your
server
pod if needed. - Monitor the server pod logs for OOMKilled or throttling messages. - Ensure your cluster nodes have enough headroom for the static workloads, independent of the jobs node group. If you have already separated node groups and are still seeing restarts, the most common overlooked cause is excessive logging or under-provisioned resources for the
server
pod [DEBUG Logs](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#debug-logs). If you need more targeted help, please provide the specific error or restart reason from the pod events or logs.
i
@kapa.ai i currently dont have any resource limits on server pods. is there some default ? that might be less and because of which server pods are restarting
k
A message from kapa.ai
Based on the available knowledge sources, if you do not explicitly set resource limits for your Airbyte server pods, there are no default resource limits applied by Airbyte itself. The official Helm chart and documentation recommend that users consciously set these values, and by default, the
resources
field for the server pod is left empty:
Copy code
yaml server:   resources:     limits: {}     requests: {}
This means that unless you or your cluster administrator have set a [Kubernetes LimitRange](https://kubernetes.io/docs/concepts/policy/limit-range/) at the namespace level, your server pods will not have any CPU or memory limits or requests, and will be able to use as much as the node allows—until the node itself is under pressure, at which point the pod may be evicted or killed by the system [source](https://github.com/airbytehq/airbyte/issues/49843). If your cluster has a LimitRange policy, then the default values from that policy will apply, which could be quite low and may cause your server pods to be killed if they exceed those limits. This is a common cause of unexpected restarts when no explicit limits are set in your deployment configuration. Recommendation: Explicitly set resource requests and limits for your server pods in your
values.yaml
to ensure they have enough resources and are not subject to restrictive defaults from the cluster:
Copy code
yaml server:   resources:     requests:       cpu: 500m       memory: 1Gi     limits:       cpu: 1       memory: 2Gi
You should monitor your server pod usage and adjust these values as needed for your workload. > In summary: There are no Airbyte defaults for server pod resources; if you don't set them, your cluster's defaults (if any) will apply, which may be too low and cause restarts. [Reference](https://github.com/airbytehq/airbyte/issues/49843)
i
@kapa.ai can i push the resource changes while sync are running ?
k
A message from kapa.ai
The knowledge sources do not explicitly state whether you can safely push resource changes (such as updating CPU/memory requests and limits) to Airbyte pods while syncs are running. However, based on Kubernetes best practices, updating resource configurations (for example, by changing your
values.yaml
and running a Helm upgrade) will typically cause the affected pods to restart in order to apply the new settings. Important considerations: - If you update resource settings for pods that are currently running sync jobs, those pods may be restarted, which can interrupt any in-progress syncs. - To avoid disrupting running jobs, it is generally best to apply such changes during a maintenance window or when no critical syncs are running. Since the Airbyte documentation does not provide a specific recommendation or guarantee for this scenario, proceed with caution and plan for possible job interruptions when applying resource changes during active syncs [Scaling Airbyte After Installation](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte).
i
@kapa.ai what should be the values for liveness probe and readiness probe. My server pod keeps restarting when a high load is recived
k
A message from kapa.ai
The knowledge sources provide example values for configuring liveness and readiness probes for the Airbyte server pod, but do not prescribe strict defaults. Here are typical values you can use as a starting point, based on the official Helm chart and community examples:
Copy code
yaml livenessProbe:   enabled: true   initialDelaySeconds: 30   periodSeconds: 10   timeoutSeconds: 10   failureThreshold: 3   successThreshold: 1  readinessProbe:   enabled: true   initialDelaySeconds: 10   periodSeconds: 10   timeoutSeconds: 10   failureThreshold: 3   successThreshold: 1
These values are commonly used and recommended in Airbyte’s Helm chart examples [source](https://github.com/airbytehq/airbyte/issues/49843). Important notes: - If your server pod is restarting under high load, the issue is likely related to resource exhaustion (CPU or memory) rather than probe configuration. Ensure your resource requests and limits are set appropriately for your workload. - Liveness and readiness probes should be tuned to avoid false positives under heavy load. If your pod is slow to respond during high load, you may want to increase
timeoutSeconds
or
failureThreshold
to give the pod more time to recover before Kubernetes restarts it. If you continue to see restarts, review your pod logs for OOMKilled or throttling messages and consider increasing your resource limits in addition to adjusting probe values.