I'm using RDS for my external database for deployi...
# replication-troubleshooting
l
I'm using RDS for my external database for deploying self hosted airbyte - are there any minimum requirements for external database? I'm running a t3.large and my CPU is pinned at 100%, temporal is holding 150 idle connections - does anyone know what the min RDS size I should use?
k
The Airbyte documentation does not specify a strict minimum RDS instance size for running Airbyte with an external Postgres database like AWS RDS. However, there are some relevant recommendations and considerations: - Instance Sizing: For Airbyte itself, it is generally recommended to start with a mid-sized cloud instance (e.g., 4 or 8 cores) and tune based on your workload. This advice is for the Airbyte application, but it implies that your database should be sized to handle the expected load, especially if you have high concurrency or large sync jobs. There is no explicit minimum RDS size mentioned for the database, but under-provisioned instances (like t3.micro) are discouraged for Airbyte in general, and by extension, for the database as well. For testing, a t2.medium is suggested, and for production, a t2.large or larger is recommended for Airbyte nodes, which can be a useful reference for your RDS sizing as well [Deploy EC2: Slow runtime on t3.micro](https://discuss.airbyte.io/t/2334). - Temporal DB Connections: Temporal, which Airbyte uses for orchestration, maintains multiple idle connections by default (20 per pool), but due to multiple pools, you may see 4-5 times more connections than expected. If you are seeing 150 idle connections, this is likely due to this pooling behavior. You can control this with the
SQL_MAX_IDLE_CONNS
and
SQL_MAX_CONNS
environment variables. If you increase idle connections, you must also increase the max connections accordingly, as idle is capped by max [Scaling Airbyte: Temporal DB](https://docs.airbyte.com/platform/next/operator-guides/scaling-airbyte#what-to-scale). - CPU Usage: If your RDS instance (t3.large) is pinned at 100% CPU, it is likely under-provisioned for your workload. You should consider scaling up to a larger instance class (e.g., t3.xlarge or r5.large) or optimizing your Airbyte and Temporal configuration to reduce the number of idle connections and overall load. Summary: There is no hard minimum RDS size documented, but for production workloads, you should use at least a medium or large instance (e.g., t3.large or larger), and monitor your CPU and connection usage. If you are seeing 100% CPU and 150 idle connections, you likely need to increase your RDS instance size and/or tune Temporal's connection pool settings. If you need more precise sizing, you will need to monitor your workload and scale accordingly, as requirements can vary significantly based on sync frequency, data volume, and number of concurrent jobs. For more details, see: - [Scaling Airbyte: What To Scale](https://docs.airbyte.com/platform/next/operator-guides/scaling-airbyte#what-to-scale) - [Deploy EC2: Slow runtime on t3.micro](https://discuss.airbyte.io/t/2334)
l
@kapa.ai has anyone ran into high cpu on external database?
k
A message from kapa.ai
Yes, there are reports from Airbyte users experiencing high CPU usage on their external databases, particularly when using AWS RDS for Airbyte's internal database. For example, one user reported that connections to their RDS Postgres database were not being closed, leading to reaching the maximum number of allowed connections and causing performance issues. This resulted in the need to restart the database to resolve the problem. The issue was ultimately resolved by updating Airbyte to a newer version, suggesting that some earlier versions may have had issues with connection management that could contribute to high CPU usage on the database<sup>[source](https://discuss.airbyte.io/t/1953)</sup>. Additionally, Airbyte's orchestration system (Temporal) is known to maintain multiple idle connections to the database, and due to multiple connection pools, the actual number of connections can be 4-5 times higher than expected. This can put significant load on the database, especially if the instance is under-provisioned or if the connection pool settings are not tuned appropriately<sup>[source](https://docs.airbyte.com/platform/next/operator-guides/scaling-airbyte#what-to-scale)</sup>. If you are experiencing high CPU on your external database, it is recommended to: - Review and potentially increase your RDS instance size. - Tune Temporal's connection pool settings (
SQL_MAX_IDLE_CONNS
and
SQL_MAX_CONNS
). - Ensure you are running a recent version of Airbyte, as connection management has improved over time. If you need more details on how to adjust these settings, let me know!