Arif Chaudhary
06/02/2024, 7:41 AMkapa.ai
06/02/2024, 7:41 AM-Xmx1024M
in a Docker-based deployment, you can modify the DEFAULT_JVM_OPTS
environment variable. Here are the steps to do this: 1. Edit the .env
file: Locate the .env
file in your Airbyte installation directory. This file contains environment variables that configure various aspects of Airbyte. 2. Set the JVM options: Add or modify the DEFAULT_JVM_OPTS
variable to include the -Xmx1024M
option. This will set the maximum heap size to 1024 MB. Your .env
file should look something like this: plaintext DEFAULT_JVM_OPTS='-Xmx1024M -XX:+ExitOnOutOfMemoryError -XX:MaxRAMPercentage=75.0'
3. Restart Airbyte: After making these changes, restart your Airbyte instance to apply the new settings. You can do this by running the following commands: bash docker-compose down docker-compose up -d
This will ensure that the new JVM options are applied to the Airbyte server and worker containers. ### Example .env
File plaintext # Other environment variables DEFAULT_JVM_OPTS='-Xmx1024M -XX:+ExitOnOutOfMemoryError -XX:MaxRAMPercentage=75.0'
### Additional Information - Manual Garbage Collection: If you continue to experience high memory usage, you can manually trigger the Java Garbage Collector (GC) in the worker container as a temporary workaround. SSH into the worker container and run the GC command: bash docker exec -it airbyte-worker /bin/bash jcmd 1 GC.run
- Memory Limits: You can also adjust the memory limits for your jobs in the .env
file. For example: plaintext JOB_MAIN_CONTAINER_MEMORY_REQUEST=4g JOB_MAIN_CONTAINER_MEMORY_LIMIT=6g
For more details, you can refer to the relevant discussions and issues: - [Github Issue 16652](https://github.com/airbytehq/airbyte/issues/16652) - [Github Issue 27844](https://github.com/airbytehq/airbyte/issues/27844) If you need further assistance, please refer to the [Airbyte documentation](https://docs.airbyte.com/operator-guides/configuring-airbyte/#docker-deployments).Arif Chaudhary
06/02/2024, 12:05 PMkapa.ai
06/02/2024, 12:05 PMDEFAULT_JVM_OPTS
parameter to your .env
file if it is not already present. This parameter is used to set default JVM options for the Airbyte server and worker containers. Here is an example of how you can set the DEFAULT_JVM_OPTS
in your .env
file: env DEFAULT_JVM_OPTS='-XX:+ExitOnOutOfMemoryError -XX:MaxRAMPercentage=75.0'
This configuration sets the JVM to exit on an out-of-memory error and limits the maximum RAM usage to 75% of the available memory. For more details, you can refer to the relevant discussions and issues: - [Github Issue 16652](https://github.com/airbytehq/airbyte/issues/16652) - [Github Issue 36557](https://github.com/airbytehq/airbyte/issues/36557) If you need to debug or adjust other JVM options, you can also look into setting JAVA_TOOL_OPTIONS
as described in the [Airbyte documentation](https://docs.airbyte.com/connector-development/debugging-docker#docker-compose-extension).