Data_source_timeout

I’ve successfully set up a connection between a MongoDB Atlas database and a QuickSight dashboard via Athena. The test database loading process went smoothly, with everything working as expected. However, I’m encountering a timeout error when I attempt to select my project database and it’s not related to the database user permission.

Error details

region: eu-west-2
timestamp: 1696874214003
requestId: fcffb85d-51be-463d-8932-2ac0b526a831
sourceErrorCode: DATA_SOURCE_TIMEOUT
sourceErrorMessage: Server execution exceeded 50 seconds, which is calculated based on client TTL and service config

test

The following are common reasons for getting timeout errors when you’re importing data into QuickSight using direct query mode:

  • Data preparation takes more than 50 seconds.
  • Generating a visual takes more than 2 minutes.
  • The query runtime exceeds the data source timeout quota for the Amazon service that you’re importing from. To see the data source timeout quota for your Amazon service, see AWS service quotas.

Note: You can’t increase the 2-minute visual generation timeout quota.

Resolution

Limit the data that you’re importing

The following are steps that you can take to limit the amount of data that you’re importing into QuickSight:

  • Unselect columns that you don’t need.
  • Add filters to your dataset in QuickSight.
  • Use predicates in your custom SQL query such as WHERE and HAVING.

Import the data into SPICE

When you import your data into SPICE, queries process faster.

Note: The 50-second timeout quota for data preparation and 2-minute timeout for generating visuals still apply when you use SPICE. However, if you’re using Amazon Athena to import data into QuickSight, then the query timeout is 30 minutes.

For more information on SPICE quotas for imported data and quotas for direct SQL queries, see Data source quotas.

1 Like

@niyati When I try to add the dataset, I get this error. Do you have any suggestions or solutions for this?

image

Hi @Nithin - are you able to see the data via athena console? Also how you are accessing mongodb data via athena? are you using Amazon Athena DocumentDB Connector. Looks like QuickSight is not able to connect it properly to mongo db via athena. It will be good if you can raise a ticket to AWS customer support for detail investigation. To raise the request, please follow the link - Creating support cases and case management - AWS Support

Regards - Sanjeeb

Yes, I am using the Amazon Athena DocumentDB Connector.

HI @Nithin - Ok, i never tested this approach as Document DB is a NOSQL and there is always a challenge in integrating with QuickSight. Is it possible to change the approach, extract the files from Document DB and put the files in S3 in compressed format ( for high speed) and create your athena table pointing to S3. This will surely work.

Hi @duncan @David_Wong @Max - any advise on this.

Regards - Sanjeeb

2 Likes