I am trying to provision more resources to source ...
# replication-ask-ai
a
I am trying to provision more resources to source connector which reads the data using variable JOB_MAIN_CONTAINER_MEMORY_REQUEST=1g JOB_MAIN_CONTAINER_MEMORY_LIMIT=3g but docker stats and sync logs show requested memory 1Gi and Memory limit 2Gi why GI is visible in docker deployment it should be 1g or 3g
k
The discrepancy you're seeing might be due to the way Docker and Kubernetes handle memory units. In Docker, the 'g' suffix represents gigabytes, while in Kubernetes, 'Gi' is used to represent gibibytes. Gibibytes are based on the binary system (base 2), while gigabytes are based on the decimal system (base 10). However, the difference between these two units is minimal and usually doesn't affect the performance of your applications. If you're seeing a different memory limit than what you've set in the
JOB_MAIN_CONTAINER_MEMORY_LIMIT
environment variable, it might be due to the behavior of Java connectors. As mentioned in the [Airbyte documentation](https://docs.airbyte.com/operator-guides/scaling-airbyte), Java connectors follow Java's default behavior with container memory and will only use up to 1/4 of the host's allocated memory. If you want to customize this, you can set the
JOB_MAIN_CONTAINER_MEMORY_REQUEST
and
JOB_MAIN_CONTAINER_MEMORY_LIMIT
environment variables to custom values. To confirm if the right configuration is being detected, you can check the job logs in the Airbyte UI. As mentioned in the [Airbyte documentation](https://docs.airbyte.com/operator-guides/configuring-connector-resources/), Airbyte logs the resource requirements as part of the job logs as containers are created. If you've updated the specification of a connector and need to clear the cache so the API / UI picks up the change, you can either go to the Admin page in the UI and update the version of the connector or restart the server from your local
airbyte-platform
repository as mentioned in the [Airbyte documentation](https://docs.airbyte.com/contributing-to-airbyte/resources/developing-locally).
h
@kapa.ai what is the default size for container memory limit
k
The default size for the container memory limit in Airbyte is not explicitly set, meaning it defaults to none. This is indicated in the documentation: >
JOB_MAIN_CONTAINER_MEMORY_LIMIT
- Defines the job container's maximum RAM usage. Units follow either Docker or Kubernetes, depending on the deployment. Defaults to none. ([Source](https://docs.airbyte.com/operator-guides/configuring-airbyte#jobs)) If you want to set a specific memory limit, you can configure the
JOB_MAIN_CONTAINER_MEMORY_LIMIT
environment variable in your
.env
file. For example:
Copy code
plaintext JOB_MAIN_CONTAINER_MEMORY_LIMIT=2GB
This will set the memory limit to 2GB for the job container.
h
@kapa.ai I mean if not set what will be the limit
k
A message from kapa.ai
If the
JOB_MAIN_CONTAINER_MEMORY_LIMIT
is not set, there is no default memory limit applied to the job container. This means the container can use as much memory as the host system allows, which can potentially lead to out-of-memory errors if the container's memory usage exceeds the available memory on the host. This is confirmed in the documentation: >
JOB_MAIN_CONTAINER_MEMORY_LIMIT
- Defines the job container's maximum RAM usage. Units follow either Docker or Kubernetes, depending on the deployment. Defaults to none. ([Source](https://docs.airbyte.com/operator-guides/configuring-airbyte#jobs)) In practice, this means that without setting this environment variable, the container will not have a predefined memory limit and can consume all available memory on the host system, potentially causing instability or crashes if the memory usage becomes too high.
A message from kapa.ai
If the
JOB_MAIN_CONTAINER_MEMORY_LIMIT
is not set, there is no default memory limit applied to the job container. This means the container can use as much memory as the host system allows, which can potentially lead to out-of-memory errors if the container's memory usage exceeds the available memory on the host. This is confirmed in the documentation: >
JOB_MAIN_CONTAINER_MEMORY_LIMIT
- Defines the job container's maximum RAM usage. Units follow either Docker or Kubernetes, depending on the deployment. Defaults to none. ([Source](https://docs.airbyte.com/operator-guides/configuring-airbyte#jobs)) In practice, this means that without setting this environment variable, the container will not have a predefined memory limit and can consume all available memory on the host system, potentially causing instability or crashes if the memory usage becomes too high.