<@U04S8PLJWMT> How to increase resources for sourc...
# ask-ai
m
@kapa.ai How to increase resources for source and destination containers inside airbyte?
k
To increase resources (CPU and memory) for source and destination containers in Airbyte, you have several options, each with a different scope and precedence: ### 1. Instance-wide Configuration Set environment variables in your
values.yaml
file (for Helm/Kubernetes deployments) to define default resource requests and limits for all job containers:
Copy code
yaml global:   env_vars:     JOB_MAIN_CONTAINER_CPU_REQUEST: "1"     JOB_MAIN_CONTAINER_CPU_LIMIT: "2"     JOB_MAIN_CONTAINER_MEMORY_REQUEST: "2Gi"     JOB_MAIN_CONTAINER_MEMORY_LIMIT: "4Gi"
These variables set the minimum and maximum CPU and memory for all job containers unless overridden elsewhere. There are also job-type-specific variables (e.g.,
CHECK_JOB_MAIN_CONTAINER_MEMORY_LIMIT
,
DISCOVER_JOB_MAIN_CONTAINER_MEMORY_LIMIT
, etc.) that you can set for more granular control over different job types. Make sure to set all relevant variables, as some jobs (like check, discover, spec) use their own environment variables and may not inherit the main job settings. This is especially important in Kubernetes, where default cluster limits may cause OOM errors if not explicitly set for each job type [Configuring Connector Resources](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources), [GitHub Issue #48816](https://github.com/airbytehq/airbyte/issues/48816). ### 2. Connector Definition Level You can set resource requirements for all connectors of a specific type (e.g., all Stripe sources) by updating the
actor_definition
table in Airbyte's database:
Copy code
sql update actor_definition set resource_requirements = '{"jobSpecific": [{"jobType": "sync", "resourceRequirements": {"cpu_limit": "2", "cpu_request": "2", "memory_limit": "2048Mi", "memory_request": "2048Mi"}}]}' where id = '<connector-definition-id>';
This applies to all connectors of that type and overrides instance-wide settings [Configuring Connector Resources](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources). ### 3. Connector-Specific and Connection-Specific - Connector-specific: Applies to a single connector instance. - Connection-specific: Applies to a specific source-destination connection. These can be set via the Airbyte UI or API (in Self-Managed Enterprise), and have the highest precedence. If you define resources at this level, they override all broader settings [Release Notes v1.5](https://docs.airbyte.com/release_notes/v-1.5#-self-managed-enterprise-changes). ### 4. Debugging To verify your configuration, check the job logs in the Airbyte UI. The logs will show the resource requests and limits for each container as the job starts. This helps confirm that your settings are being applied as expected [Configuring Connector Resources - Debugging](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources#debugging). --- Summary: - Set instance-wide defaults in
values.yaml
for all jobs. - Use SQL to set connector-type defaults. - Use the UI/API for connector- or connection-specific overrides. - Always check job logs to confirm your settings are active. For Kubernetes, ensure you set all relevant environment variables for each job type to avoid OOM issues, as Kubernetes may fall back to cluster defaults if not explicitly set [GitHub Issue #48816](https://github.com/airbytehq/airbyte/issues/48816).
To increase resources (CPU and memory) for source and destination containers in Airbyte, you have several options, each with a different scope and precedence. Here’s how you can do it: ### 1. Instance-wide Configuration Set environment variables in your
values.yaml
file to define default resource requests and limits for all job containers:
Copy code
yaml global:   env_vars:     JOB_MAIN_CONTAINER_CPU_REQUEST: "1"     JOB_MAIN_CONTAINER_CPU_LIMIT: "2"     JOB_MAIN_CONTAINER_MEMORY_REQUEST: "2Gi"     JOB_MAIN_CONTAINER_MEMORY_LIMIT: "4Gi"
This will apply to all containers unless overridden by more specific settings. You can also set these directly under
jobs.resources
in
values.yaml
for Helm deployments:
Copy code
yaml jobs:   resources:     requests:       cpu: 500m       memory: 4096Mi     limits:       cpu: 1000m       memory: 8192Mi
[Configuring Connector Resources](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources) ### 2. Connector Definition Level To set resources for all connectors of a specific type (e.g., all Postgres sources), update the
actor_definition
table in the Airbyte database:
Copy code
sql update actor_definition set resource_requirements = '{"jobSpecific": [{"jobType": "sync", "resourceRequirements": {"cpu_limit": "2", "cpu_request": "2", "memory_limit": "2048Mi", "memory_request": "2048Mi"}}]}' where id = '<connector-definition-id>';
Find the connector definition ID with:
Copy code
sql select * from actor_definition where actor_definition.docker_repository like '%<image-name>';
[Configuring Connector Resources](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources) ### 3. Connector-Specific and Connection-Specific You can also set resource requirements for a specific connector instance or for a specific connection directly in the Airbyte UI or via the API. These settings will override the broader configurations above. In Self-Managed Enterprise, this can be done in the UI when setting up a source or destination connector, or at the connection level. The order of precedence is: Connection > Connector > Connector YAML definition > Environment variables [Self-Managed Enterprise Changes](https://docs.airbyte.com/release_notes/v-1.5#-self-managed-enterprise-changes). ### 4. Debugging and Verification After making changes, check the job logs in the Airbyte UI to confirm the correct resource configuration is being applied. The logs will show the resource requests and limits for each container as jobs are launched [Debugging Connection Resources](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources#debugging). --- Note: If you are running Airbyte on Kubernetes and changes to resource settings are not taking effect, you may need to manually delete pods so that Kubernetes recreates them with the new environment variables or config map values. Also, for different job types (Sync, Check, Discover, Spec), you may need to set additional environment variables (e.g.,
CHECK_JOB_MAIN_CONTAINER_MEMORY_LIMIT
) if you want to control resources for those operations as well [Github Issue #48816](https://github.com/airbytehq/airbyte/issues/48816). If you need more granular control or run into issues, consult the official documentation for your Airbyte version, as resource configuration mechanisms may evolve between releases.
m
@kapa.ai I updated actor_definition but containers are still created with old resources
k
A message from kapa.ai
If you updated the
actor_definition
table with new resource requirements but containers are still being created with the old resources, this is a known issue reported by several users. The most likely reasons are: 1. Precedence of Configuration: Airbyte uses a configuration hierarchy. If there are resource requirements set at the connection level (in the
connection
table), these will override the settings in
actor_definition
. Make sure the
resource_requirements
field in the
connection
table is
NULL
for the relevant connections, otherwise your
actor_definition
changes will not take effect [Configuring Connector Resources](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources). 2. Instance-wide Defaults Override: In some Airbyte versions, the instance-wide settings (e.g., environment variables like
JOB_MAIN_CONTAINER_CPU_LIMIT
) may override or take precedence over the
actor_definition
settings, especially if the system is not picking up the database changes. This has been observed in multiple user reports, where the containers continue to use the values from the environment/configmap instead of the database [Syncs don't respect the resource_requirements set in the actor_definition table](https://github.com/airbytehq/airbyte/issues/38178). 3. Airbyte Version Limitations or Bugs: There are open and closed issues indicating that, in some Airbyte versions, updates to
actor_definition.resource_requirements
are not respected by the job containers. This has been confirmed by users and contributors, even after restarting Airbyte or ensuring no connection-level overrides exist [Syncs don't respect the resource_requirements set in the actor_definition table](https://github.com/airbytehq/airbyte/issues/38178), [Configuring Connector-Specific not working](https://github.com/airbytehq/airbyte/issues/33857). 4. Restart Required: In some cases, users have reported that after updating the database, they needed to manually delete worker pods or restart Airbyte services for the new settings to take effect [Sync jobs do not appear to respect CPU / memory requests and limits](https://github.com/airbytehq/airbyte/issues/42921). Summary: - Check for connection-level overrides in the
connection
table. - Be aware of possible bugs or version limitations. - Try restarting Airbyte or deleting worker pods after making changes. - If the issue persists, it may be a bug in your Airbyte version. If after these steps the problem remains, you may be encountering a known issue that is not yet resolved in your version of Airbyte.
m
@kapa.ai So my changes ado not help ( not in actor_definition, not in connection) They are still 2025-07-25 215318 platform INFO [destination] image: airbyte/destination-snowflake:3.15.9 resources: ResourceRequirements(claims=[], limits={memory=4Gi, cpu=3}, requests={memory=1Gi, cpu=1}, additionalProperties={}) Is there any other way to change them in db
k
A message from kapa.ai
Based on the knowledge sources, if updating the
resource_requirements
in both the
actor_definition
and
connection
tables does not change the resources for your containers, and you still see the old values in the logs, this is a known issue in some Airbyte versions. Multiple users have reported that Airbyte jobs continue to use the instance-wide defaults (from environment variables or Helm values) even after updating the database, and that the database changes are not respected by the job containers [Syncs don't respect the resource_requirements set in the actor_definition table](https://github.com/airbytehq/airbyte/issues/38178), [Configuring Connector-Specific not working](https://github.com/airbytehq/airbyte/issues/33857). There is no documented alternative database table or field to update for resource requirements beyond
actor_definition
and
connection
. The only other supported method is to set the instance-wide resource limits using environment variables (e.g.,
JOB_MAIN_CONTAINER_CPU_LIMIT
,
JOB_MAIN_CONTAINER_MEMORY_LIMIT
) in your deployment configuration (such as
values.yaml
for Helm/Kubernetes) [Configuring Connector Resources](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources). Additionally, some users have found that after making changes, they needed to manually delete worker pods or restart Airbyte services for the new settings to take effect [Sync jobs do not appear to respect CPU / memory requests and limits](https://github.com/airbytehq/airbyte/issues/42921). In summary: - There is no other documented way to change resource requirements in the database. - If both
actor_definition
and
connection
changes do not work, set the resource limits via environment variables in your deployment configuration. - Restart Airbyte or delete worker pods after making changes to ensure new settings are picked up. - If the issue persists, it is likely due to a bug or limitation in your Airbyte version. If you need more granular control and the above methods do not work, you may need to follow up on the relevant GitHub issues or consider upgrading Airbyte if a fix has been released.