Dataset Scheduled Refresh Fails with CONNECTION_FAILURE (PostgreSQL RDS) – Query Reaches DB But Fails After a Few Minutes

Hi everyone,

Since July 9, I’ve been encountering an issue with a scheduled refresh on a dataset in Amazon Quick Sight that connects to a PostgreSQL RDS instance. The dataset fails to refresh and shows the following error:

Error type:  
CONNECTION_FAILURE  

Amazon Quick Sight can’t connect to your data source. Check the data source connection settings and try again.

Error details:  
An I/O error occurred while sending to the backend.

However, upon investigation I’ve confirmed the following:

  • The database connection is working – I can manually connect from Quick Sight and other tools.
  • When the refresh starts, I can see the query being executed in the PostgreSQL logs and in the RDS Performance Insights, meaning the query does reach the backend and starts processing.
  • Despite that, the refresh fails after 3 to 5 minutes, consistently.

There have been no changes on my end to the dataset or connection settings that coincide with this issue starting.

My Questions:

  • Has anyone else experienced a similar issue starting in July?
  • Could this be related to an internal Quick Sight timeout or a recent update/change in how Quick Sight manages connections?
  • Is there any way to get more detailed logs or diagnostics from Quick Sight for these failures?
  • Are there known limits or best practices for long-running queries in scheduled dataset refreshes?

Any help or guidance would be much appreciated!

Thanks in advance,
Javier

Hi @javierReworth

Welcome to the community!

I haven’t used Postgres, but have experience dealing with mySQL.

From my experience you need to look at your database and see if the query that is issued by Quick Sight and captured in your database does work completely or times out in the database level itself through your querying tool.

Query plans do change once Quick Sight’s incremental refresh time conditions gets put in and I have had cases where I had to tweak my Custom SQL Queries a bit to make them work. I had refresh failures with a generic error but not a connection timeout error.

Regards,
Giri

Hi @javierReworth

It’s been a while since we last heard from you. If you have any further questions, please let us know how we can assist you.

If we don’t hear back within the next 3 business days, we’ll proceed with close/archive this topic.

Thank you!

Hello @Giridhar.Prabhu

Thank you for your response.

I ran the same query using my tool, and it seems the long execution time is due to the volume of data. An incremental approach might be a more effective strategy moving forward. In the meantime, I’ve applied a time constraint to limit the data to the past year.

I appreciate your support.

Best,
Javier

1 Like