<@U04S8PLJWMT> How can I specify memory and cpu li...
# ask-ai
z
@kapa.ai How can I specify memory and cpu limits for the source, destination and orchestrator separately?
k
Short answer: Instance-wide env vars apply to all job containers (including the orchestrator), but you can override them per connector type, per specific connector, or per connection. The docs do not show a first-class way to set different limits specifically for source vs destination vs orchestrator in one place; instead you use the configuration hierarchy to target what you need. What you can do today - Instance-wide defaults (applies to all job containers, including orchestrator): - Set in values.yaml: - JOB_MAIN_CONTAINER_CPU_REQUEST / JOB_MAIN_CONTAINER_CPU_LIMIT - JOB_MAIN_CONTAINER_MEMORY_REQUEST / JOB_MAIN_CONTAINER_MEMORY_LIMIT These values will apply to the orchestrator and to job containers unless overridden at a narrower scope. [[Configuring connector resources](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources); [Forum 3775](https://discuss.airbyte.io/t/3775).] - Per connector definition (all connectors of a given type, e.g., all Stripe sources or all Snowflake destinations): - Update the actor_definition row to set resource_requirements JSON for the job type (e.g., sync). Example:
Copy code
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 lets you give different limits to “source types” vs “destination types” by editing their respective definitions. [[Configuring connector resources](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources).] - Per connector instance (Self-Managed Enterprise only): - In the connector’s Settings, choose a resource profile (Default/Large/Memory Intensive/Maximum). This allows different resources for a specific source vs a specific destination. [[Connector-specific requirements](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources#configuring-connector-specific-requirements).] - Per connection: - Apply connection-specific resource requirements (highest precedence), useful when a single source→destination pair needs more/less than defaults. [[Configuring connector resources](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources).] Notes and limitations - Orchestrator inherits JOB_MAIN_CONTAINER_* by design. There isn’t a documented, separate orchestrator-only env var in the provided docs. [[Forum 3775](https://discuss.airbyte.io/t/3775).] - Different job types (check/discover/spec vs sync) can need separate env vars if you’re seeing OOM during setup/check/discover. Community feedback shows you can set CHECK_JOB_MAIN_CONTAINER_*, DISCOVER_JOB_MAIN_CONTAINER_*, SPEC_JOB_MAIN_CONTAINER_* to control those phases specifically in Helm values via global.env_vars. [[GitHub 48816](https://github.com/airbytehq/airbyte/issues/48816).] - To debug what actually got applied, open a job’s logs; Airbyte prints the computed requests/limits for source, destination, and orchestrator containers. [[Debugging](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources#debugging).] Putting it together to separate source vs destination vs orchestrator - Source vs destination: Use connector definition (SQL) or connector-specific (UI/API in Enterprise) to assign different resource profiles/limits to your source type(s) and destination type(s). This effectively separates resources for source and destination. [[Configuring connector resources](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources); [Connector-specific requirements](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources#configuring-connector-specific-requirements).] - Orchestrator: The knowledge sources do not explicitly document a dedicated configuration key to set orchestrator resources independently from source/destination for sync jobs. Orchestrator will pick up JOB_MAIN_CONTAINER_* unless overridden by a more specific mechanism, but a distinct “orchestrator-only” knob is not described in the provided docs. [[Forum 3775](https://discuss.airbyte.io/t/3775).] If you need finer-grained control for non-sync phases (check/discover/spec) to avoid OOMs during setup, set the CHECK_/DISCOVER_/SPEC_ JOB_MAIN_CONTAINER_* env vars accordingly and verify in logs. [[GitHub 48816](https://github.com/airbytehq/airbyte/issues/48816); [Debugging](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources#debugging).]
z
@kapa.ai I'm seeing OOMKilled and want to increase the memory on the source container only.
k
A message from kapa.ai
You can raise memory just for the source by targeting the source’s connector definition or a single source instance. These approaches won’t affect the destination. Options, from broader to narrower: 1) Connector definition (all sources of that type) - Find the source’s actor definition id:
Copy code
select * from actor_definition   where actor_definition.docker_repository like '%<image-name>';
- Update its sync job resources (example sets 2 CPUs and 4 GiB):
Copy code
update actor_definition   set resource_requirements = '{"jobSpecific": [{"jobType": "sync", "resourceRequirements": {"cpu_limit": "2", "cpu_request": "2", "memory_limit": "4096Mi", "memory_request": "4096Mi"}}]}'   where id = '<id-from-step-1>';
This increases resources for that source type only, not the destination. [[Configuring connector resources](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources#configuring-connector-definition-requirements); [v1.7 guide](https://docs.airbyte.com/platform/1.7/operator-guides/configuring-connector-resources#configuring-connector-definition-requirements).] 2) Connector-specific (one source instance; Self-Managed Enterprise) - In the source’s Settings, set a higher “Connector resource allocation” profile (e.g., Memory Intensive/Maximum), which applies only to that source. [[Connector-specific requirements](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources#configuring-connector-specific-requirements).] 3) Connection-specific (highest precedence; just for this source→destination pair) - Update the connection’s resource_requirements JSON:
Copy code
update connection   set resource_requirements = '{"cpu_limit": "2", "cpu_request": "2", "memory_limit": "4096Mi", "memory_request": "4096Mi"}'   where id = '<your-connection-id>';
Note: This sets the sync job resources used by the containers in that connection; it’s the most targeted override. [[Connection-specific requirements](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources#configuring-connection-specific-requirements); [v1.7 example](https://docs.airbyte.com/platform/1.7/operator-guides/configuring-connector-resources#configuring-connection-specific-requirements).] Helpful tip about job types If the OOM happens during check/discover/spec (not sync), you may also need to raise the corresponding job resources via the job-type-specific environment variables in Helm values (CHECK_/DISCOVER_/SPEC_ JOB_MAIN_CONTAINER_*), as reported by users running on Kubernetes. [[GitHub issue 48816](https://github.com/airbytehq/airbyte/issues/48816).] Precedence reminder When multiple settings exist, the narrower scope wins: Connection > Connector-specific > Connector definition > Instance-wide env vars. [[Release notes 1.5](https://docs.airbyte.com/release_notes/v-1.5#-self-managed-enterprise-changes); [Configuring connector resources](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources).]