<@U04S8PLJWMT> I'm getting error 504 when trying t...
# ask-ai
s
@kapa.ai I'm getting error 504 when trying to set PostgreSQL destination. This seems like some timeout. How can I set it to higher value? My PSQL is created in Amazon Aurora
k
Based on the knowledge sources, a 504 error when setting up a PostgreSQL destination in Airbyte is typically related to timeout issues. Here are the relevant solutions: ## For Ingress Timeout If you're experiencing 504 errors in the UI when creating new destinations, you need to set appropriate backend timeout values for the Airbyte server ingress. According to the [Configuring Ingress](https://docs.airbyte.com/platform/enterprise-setup/implementation-guide#configuring-ingress) documentation, timeout values that are too short can lead to 504 errors in the UI when creating new sources or destinations. ## For Schema Discovery Timeout If the timeout occurs during the schema discovery process (when Airbyte is discovering the topology of your PostgreSQL source), you can increase Airbyte's timeout limits by modifying your
values.yaml
file. According to the [Schema Discovery Timeouts](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#schema-discovery-timeouts) documentation:
Copy code
yaml server:     extraEnv:       - name: HTTP_IDLE_TIMEOUT         value: 20m       - name: READ_TIMEOUT         value: 30m
## For PostgreSQL Connection Timeout The PostgreSQL destination connector supports a
connectTimeout
parameter that defaults to 60 seconds. According to the [Postgres destination documentation](https://docs.airbyte.com/integrations/destinations/postgres#naming-conventions), you can configure this in the JDBC URL parameters. Setting
connectTimeout
to 0 seconds will set the timeout to the longest time available. ## AWS Aurora Specific Issue Since you mentioned your PostgreSQL is on Amazon Aurora, there's an important consideration: if you're seeing timeout errors with Aurora, the [Postgres troubleshooting documentation](https://docs.airbyte.com/integrations/sources/postgres/postgres-troubleshooting#vendor-specific-connector-limitations) recommends setting the
apg_write_forward.idle_session_timeout
parameter to 1200000 (20 minutes) in the AWS Aurora parameter group. I recommend starting with adjusting the ingress timeout settings and the Aurora-specific parameter if applicable to your setup.
s
@kapa.ai how to properly set
connectTimeout
in JDBC parameters? Also, there is something like aws-lb header. How can I add it?
k
A message from kapa.ai
Based on the knowledge sources, here's how to properly configure these parameters: ## Setting
connectTimeout
in JDBC Parameters According to the [Postgres destination documentation](https://docs.airbyte.com/integrations/destinations/postgres#naming-conventions), you can set the
connectTimeout
parameter in the JDBC URL Parameters (Advanced) field when configuring your PostgreSQL destination. The format should be:
Copy code
connectTimeout=<value_in_seconds>
For example, to set a 5-minute timeout:
Copy code
connectTimeout=300
Or to set it to the longest time available:
Copy code
connectTimeout=0
If you need to combine multiple parameters, use the
&
symbol as a separator:
Copy code
key1=value1&key2=value2&connectTimeout=300
Important note: According to the documentation, do not use the following keys in the JDBC URL Params field as they will be overwritten by Airbyte:
currentSchema
,
user
,
password
,
ssl
, and
sslmode
. ## AWS Load Balancer Header I'm sorry, but the knowledge sources do not contain information about adding AWS load balancer headers in Airbyte's PostgreSQL destination configuration. The documentation focuses on JDBC URL parameters and standard connection settings, but doesn't mention AWS-specific load balancer headers. If you're experiencing timeout issues with AWS Aurora specifically, the [Postgres troubleshooting documentation](https://docs.airbyte.com/integrations/sources/postgres/postgres-troubleshooting#vendor-specific-connector-limitations) recommends setting the
apg_write_forward.idle_session_timeout
parameter to 1200000 (20 minutes) in the AWS Aurora parameter group itself, rather than through Airbyte configuration.