<@U04S8PLJWMT> java.util.concurrent.CompletionExce...
# ask-ai
k
@kapa.ai java.util.concurrent.CompletionException: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms (total=1, active=1, idle=0, waiting=3)
k
The error message:
Copy code
java.util.concurrent.CompletionException: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms (total=1, active=1, idle=0, waiting=3)
is a common connection pool timeout error in Airbyte, typically caused by the application being unable to obtain a database connection from the HikariCP connection pool within the specified timeout. This can happen for several reasons: 1. Network or Connectivity Issues: The Airbyte instance cannot reach the database due to network misconfiguration, firewall rules, or incorrect host/port. For example, if the database hostname is incorrect or the service is not running, you may see this error. Double-check your database host, port, and network accessibility from the Airbyte deployment environment. This is a frequent cause for Postgres, MySQL, and SQL Server sources and destinations in Airbyte deployments, as seen in multiple user reports and logs [Source Postgres: Could not connect with provided configuration](https://discuss.airbyte.io/t/1640), [MYSQL connection failed](https://discuss.airbyte.io/t/1994), [Timeout on microsoft SQL server](https://discuss.airbyte.io/t/1839). 2. Database Not Ready or Refusing Connections: If the database is still initializing or is refusing connections (e.g., due to permissions or wrong user), Airbyte will not be able to connect. This is also seen when the database process is not running as the correct user or the data directory has incorrect permissions [Postgres permission issue abctl in Colima](https://github.com/airbytehq/airbyte/issues/54995). 3. Connection Pool Exhaustion: If all connections in the pool are in use (active=1, idle=0, waiting=3), new requests will wait for a connection to become available. If none are returned in time, a timeout occurs. This can be due to long-running queries, slow database response, or too many concurrent requests. 4. Firewall or Whitelisting Issues: If your Airbyte instance's IP is not whitelisted on the database server, connections will time out. This is a common issue with cloud-hosted databases [Timeout on microsoft SQL server](https://discuss.airbyte.io/t/1839), [Destination MySQL - Timeout Error on Remotely Hosted Bluehost server](https://discuss.airbyte.io/t/2243). 5. Database Configuration: For MySQL, if using Amazon RDS or MariaDB, ensure the correct TLS protocol is enabled and the VPC allows public traffic if needed. For query timeouts, adjust the
max_execution_time
parameter as described in the troubleshooting guide [Troubleshooting MySQL Sources](https://docs.airbyte.com/integrations/sources/mysql/mysql-troubleshooting#troubleshooting). What to check: - Verify database host, port, username, and password. - Ensure the database is running and accessible from the Airbyte environment. - Check firewall rules and IP whitelisting. - Review database logs for refused connections or permission errors. - If using Docker or Kubernetes, ensure the correct network configuration and service discovery. - Consider increasing the connection pool size or timeout if you expect high concurrency. If you provide more context (e.g., which connector, deployment type, or database), more targeted troubleshooting steps can be suggested. If you need further help, please share relevant Airbyte logs and configuration details.
k
@kapa.ai We are receiving this error for snowflake destination
k
A message from kapa.ai
The error message:
Copy code
java.util.concurrent.CompletionException: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms (total=1, active=1, idle=0, waiting=3)
for a Snowflake destination in Airbyte typically indicates that the Airbyte worker is unable to obtain a database connection from the HikariCP connection pool within the specified timeout. Based on the knowledge sources, here are the most relevant causes and troubleshooting steps: ### Common Causes 1. Incorrect Credentials or Configuration - If the username or password is incorrect, Snowflake will reject the connection, and you may see a pool initialization error. There is a specific case where having the
password
field at the wrong level in the configuration (e.g., both at the root and inside
credentials
) caused connection failures. Make sure your credentials are set correctly and only in the expected location in the configuration schema. After correcting the credentials, the issue was resolved for another user [Snowflake Destination User Failure](https://discuss.airbyte.io/t/909). 2. Network or Firewall Issues - If Airbyte cannot reach the Snowflake endpoint due to network restrictions, firewall rules, or incorrect host/port, the connection will time out. Ensure that your Airbyte deployment can reach Snowflake's servers and that any required IP whitelisting is in place. 3. Resource Exhaustion or Pool Misconfiguration - If all connections in the pool are in use (for example, due to long-running queries or insufficient pool size), new requests will wait and eventually time out. This is less common for Snowflake destinations unless you have very high concurrency or slow network/database response. 4. Large Data Volumes or Sync Timeouts - For large syncs, the process may run for a long time and eventually hit a timeout, especially if the Snowflake JDBC driver is waiting for data chunks or network responses. This has been observed in initial syncs with large tables [Source Snowflake - JDBC timeout](https://github.com/airbytehq/airbyte/issues/21768). ### Troubleshooting Steps - Double-check your Snowflake credentials and configuration. Make sure the
password
is only set in the correct place (usually inside the
credentials
object, not at the root of
connectionConfiguration
). If you have updated credentials via the API, ensure there are no duplicate or misplaced fields, as this can cause misleading errors [Snowflake Destination User Failure](https://discuss.airbyte.io/t/909). - Test connectivity from your Airbyte environment to Snowflake using a Snowflake client or the Snowflake CLI to rule out network/firewall issues. - Review your Airbyte and Snowflake logs for more specific error messages, especially around authentication or network failures. - If you are syncing large volumes of data, consider breaking the sync into smaller batches or optimizing your Snowflake warehouse size/performance. - If you recently changed configuration via the API, ensure the schema matches what Airbyte expects, as extra or misplaced fields can cause connection failures. If you continue to see this error after checking the above, please provide: - The relevant Airbyte sync logs (especially the lines around the error) - Your Snowflake destination configuration (with sensitive info redacted) - Any recent changes to your Airbyte or Snowflake setup This will help further diagnose the root cause.
k
@kapa.ai How to update HikariCP pool
k
A message from kapa.ai
Based on the knowledge sources provided, there is no explicit documentation on how to directly configure or update HikariCP connection pool settings for Airbyte connectors. However, the knowledge sources do mention a few relevant points: 1. For the Postgres source connector, you can customize JDBC connection parameters by adding them to the JDBC URL Parameters (Advanced) field. The connector now supports
connectTimeout
and defaults to 60 seconds. You can set
connectTimeout
to 0 to use the longest time available. However, the documentation explicitly states that certain keys (like
currentSchema
,
user
,
password
,
ssl
, and
sslmode
) will be overwritten by Airbyte and should not be used in this field [Troubleshooting Postgres Sources](https://docs.airbyte.com/integrations/sources/postgres/postgres-troubleshooting#advanced-custom-jdbc-connection-strings). 2. For the ClickHouse destination, there was a reported issue where the default HikariCP timeout of 60 seconds was insufficient for ClickHouse Cloud services that idle and take time to wake up. The issue noted that even when JDBC parameters like
socket_timeout
and
connection_timeout
were specified, the HikariCP pool timeout was not being respected [destination-Clickhouse Cloud check fails](https://github.com/airbytehq/airbyte/issues/29005). This suggests that HikariCP pool settings are not directly configurable via connector configuration in all cases. 3. For schema discovery timeouts (not directly related to HikariCP, but relevant for long-running operations), you can increase Airbyte's timeout limits by setting environment variables like
HTTP_IDLE_TIMEOUT
and
READ_TIMEOUT
in your Helm chart configuration [Scaling Airbyte After Installation](https://docs.airbyte.com/platform/next/enterprise-setup/scaling-airbyte#schema-discovery-timeouts). In summary, the knowledge sources do not provide a general method to directly configure HikariCP pool settings (such as
maximumPoolSize
,
connectionTimeout
, or
idleTimeout
) for Airbyte connectors. If you need to adjust these settings for a specific connector, you may need to: - Check if the connector supports advanced JDBC parameters (as with Postgres). - Review the connector's source code or open a GitHub issue if the default HikariCP settings are insufficient for your use case. - For self-managed deployments, you might be able to adjust environment variables or JVM options, but this is not documented in the provided knowledge sources. If you have a specific connector in mind (like Snowflake, as mentioned in your previous question), please let me know, and I can provide more targeted guidance if available in the documentation.