Aman Raj
10/28/2023, 1:38 PMkapa.ai
10/28/2023, 1:39 PMAman Raj
10/28/2023, 1:41 PMkapa.ai
10/28/2023, 1:42 PMJOB_MAIN_CONTAINER_MEMORY_REQUEST and JOB_MAIN_CONTAINER_MEMORY_LIMIT environment variables to custom values. This is particularly useful when dealing with large data sources, as the Source worker in a Sync job reads up to 10,000 records in memory. For example, a table with an average row size of 0.5MBs will require 0.5 * 10000 / 1000 = 5GBs of RAM. Java connectors, which all Source database connectors are, follow Java's default behaviour with container memory and will only use up to 1/4 of the host's allocated memory. So, if you're running a Docker agent with 8GBs of RAM configured, a Java connector limits itself to 2Gbs of RAM and will see Out-of-Memory exceptions if this goes higher. The same applies to Kubernetes pods. To avoid this, you may need to over-specify memory resource for Java connectors. For more information, you can refer to the [Airbyte documentation on scaling](https://docs.airbyte.com/operator-guides/scaling-airbyte/).