```SPEC_JOB_MAIN_CONTAINER_CPU_REQUEST``` What are...
# ask-ai
r
Copy code
SPEC_JOB_MAIN_CONTAINER_CPU_REQUEST
What are these SPEC_JOB settings? @kapa.ai
k
The
SPEC_JOB_MAIN_CONTAINER_CPU_REQUEST
(and similar
SPEC_JOB_*
settings) are environment variables used to configure resource requests and limits specifically for the "Spec" job type in Airbyte. Airbyte jobs are divided into four types: Sync, Check, Discover, and Spec. Each of these job types can have its own resource requirements. The
SPEC_JOB_MAIN_CONTAINER_CPU_REQUEST
variable allows you to define the minimum CPU resources allocated to the main container running a Spec job. This is particularly useful in Kubernetes deployments to ensure that Spec jobs have enough resources and do not get throttled or fail due to insufficient CPU. Similarly, there are other variables like: -
SPEC_JOB_MAIN_CONTAINER_CPU_LIMIT
-
SPEC_JOB_MAIN_CONTAINER_MEMORY_REQUEST
-
SPEC_JOB_MAIN_CONTAINER_MEMORY_LIMIT
These allow you to fine-tune the CPU and memory resources for Spec jobs independently from other job types (like Sync, Check, or Discover). This level of granularity is important because different job types may have different resource needs, and setting them individually helps prevent issues such as out-of-memory (OOM) errors or inefficient resource usage. This approach is confirmed by user reports and discussions, where setting these variables in your
values.yaml
file (for Helm deployments) resolved resource allocation issues for specific job types, including Spec jobs. It is also recommended to document and set these variables for more granular control over Airbyte job resources, as the default
JOB_MAIN_*
variables may not apply to all job types equally [Orchestrator container gets same resource limit/request values as read/write containers](https://discuss.airbyte.io/t/3775), [Cannot use Airbyte on Kubernetes due to OOM when setting up connector](https://github.com/airbytehq/airbyte/issues/48816). If you need to set these in your Helm
values.yaml
, it would look like:
Copy code
yaml global:   env_vars:     SPEC_JOB_MAIN_CONTAINER_CPU_REQUEST: "0.5"     SPEC_JOB_MAIN_CONTAINER_CPU_LIMIT: "1"     SPEC_JOB_MAIN_CONTAINER_MEMORY_REQUEST: "512Mi"     SPEC_JOB_MAIN_CONTAINER_MEMORY_LIMIT: "1Gi"
This ensures that Spec jobs have the specified CPU and memory resources allocated.
The
SPEC_JOB_MAIN_CONTAINER_CPU_REQUEST
(and similar
SPEC_JOB_*
settings) are environment variables used to configure resource requests and limits specifically for the "spec" job containers in Airbyte when running on Kubernetes. The "spec" job is one of the four main job types in Airbyte: Sync, Check, Discover, and Spec. These variables allow you to set CPU and memory requirements for the containers that run the "spec" job, which is responsible for retrieving the connector's specification (i.e., its schema and configuration requirements). This is useful for fine-tuning resource allocation and avoiding issues like out-of-memory (OOM) errors, especially in environments with strict resource limits. Here’s an example of how these variables might be set in your
values.yaml
file:
Copy code
yaml global:   env_vars:     SPEC_JOB_MAIN_CONTAINER_CPU_REQUEST: "0.5"     SPEC_JOB_MAIN_CONTAINER_CPU_LIMIT: "1"     SPEC_JOB_MAIN_CONTAINER_MEMORY_REQUEST: "512Mi"     SPEC_JOB_MAIN_CONTAINER_MEMORY_LIMIT: "1Gi"
Setting these variables ensures that the "spec" job containers have the appropriate resources allocated, independent of the other job types (like sync, check, or discover). This level of granularity is important because different job types may have different resource requirements. This approach is confirmed by user reports and discussions in the Airbyte community, where users have resolved OOM issues by explicitly setting these variables for each job type, including
SPEC_JOB_*
, in their configuration files. It is also noted that the documentation could be improved to make these options more visible, as they are not always covered in the main documentation tables but are critical for Kubernetes deployments with custom resource constraints [Cannot use Airbyte on Kubernetes due to OOM when setting up connector](https://github.com/airbytehq/airbyte/issues/48816). If you need to set resource requirements for other job types, similar variables exist (e.g.,
CHECK_JOB_MAIN_CONTAINER_CPU_REQUEST
,
DISCOVER_JOB_MAIN_CONTAINER_CPU_REQUEST
, etc.).