<@U04S8PLJWMT> I have been using a Self-Managed Co...
# ask-ai
s
@kapa.ai I have been using a Self-Managed Community version Airbyte Platform v1.7.1 in the GKE cluster, deployed using helm chart. I created a connection between a source connector (postgreSQL) to the sink connector (BigQuery). Source DB has around 150 GiB data. Source connector throws following error after initial load of 145GiB data.
Copy code
WARN main c.z.h.p.ProxyConnection(checkException):178 HikariPool-1 - Connection org.postgresql.jdbc.PgConnection@4393593c marked as broken because of SQLSTATE(08006), ErrorCode(0) org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.fetch(QueryExecutorImpl.java:2623) ~[postgresql-42.7.4.jar:42.7.4]
k
The error you are encountering:
Copy code
HikariPool-1 - Connection org.postgresql.jdbc.PgConnection@4393593c marked as broken because of SQLSTATE(08006), ErrorCode(0) org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend.
is a known issue when syncing large datasets from PostgreSQL sources in Airbyte. This error typically indicates that the connection to the PostgreSQL database was lost during a long-running sync, often due to network interruptions, database timeouts, or resource constraints on either the source database or the Airbyte instance. Relevant findings from the knowledge sources: - This error has been reported by multiple users when syncing large tables (hundreds of GBs or billions of rows) from PostgreSQL to various destinations, including BigQuery. The connection is often marked as broken after a significant amount of data has been transferred, but before the sync completes. The root causes can include database timeouts, network issues, or the source database being under heavy load during the sync process. Adjusting JDBC timeout parameters sometimes helps, but in some cases, the timeout is hardcoded in the connector and not easily overridden by user-supplied parameters. Additionally, syncing from replicas that are under load or have data changes during the sync can also cause this issue. Upgrading the database instance size or tuning resource allocations may help, but there is no universal fix documented in the sources. See discussions and suggestions here: [Forum: Source-psql hitting oom without doing anything with the data and failing](https://discuss.airbyte.io/t/1715), [Forum: HikariPool-2 - Connection marked as broken](https://discuss.airbyte.io/t/3366), and [Forum: Source Potsgres: Connection marked as broken](https://discuss.airbyte.io/t/1800). - One user resolved a similar issue by increasing the database timeout parameter, which suggests that the default timeout may be too low for very large syncs. However, another user noted that some timeout values are hardcoded in the Airbyte Postgres connector, limiting the effectiveness of custom JDBC parameters. There is an open issue to make this value user-configurable in the future. - If you are syncing from a replica, ensure that the replica is not under heavy load and is not being updated during the sync, as this can cause the connection to drop. Recommendations: 1. Increase Database and JDBC Timeouts: Try increasing the relevant timeout settings on your PostgreSQL database and in the JDBC connection string (e.g.,
socketTimeout
,
statement_timeout
). However, be aware that some timeouts may be hardcoded in the connector and not fully overridable. 2. Monitor Resource Usage: Ensure that both your Airbyte instance and your PostgreSQL source have sufficient CPU, memory, and network resources to handle large syncs. 3. Sync Smaller Batches: If possible, break your sync into smaller batches or tables to reduce the risk of timeouts and connection drops. 4. Check for Hardcoded Timeouts: Be aware that some timeout values may be hardcoded in the Airbyte connector, as discussed in the forum. You may want to follow or contribute to the related GitHub issues for updates. 5. Database Replica Considerations: If using a replica, ensure it is promoted and not under heavy write load during the sync. If these steps do not resolve the issue, you may be encountering a limitation in the current Airbyte connector implementation for large-scale syncs. You can follow the related GitHub issues for updates on this topic. References: - [Forum: Source-psql hitting oom without doing anything with the data and failing](https://discuss.airbyte.io/t/1715) - [Forum: HikariPool-2 - Connection marked as broken](https://discuss.airbyte.io/t/3366) - [Forum: Source Potsgres: Connection marked as broken](https://discuss.airbyte.io/t/1800)