Title
Create new category
Edit page index title
Edit category
Edit link
Why does a report fail to load with error "API took too long to respond"?
This article applies to all MDSS versions
When opening a report in MDSS, the UI displays the following error:
API took too long to respond. Please try again later
The database queries are taking more than 60 seconds to return, triggering the default web server (nginx) timeout.
Increase the nginx proxy timeout and PostgreSQL query timeout values.
Both changes are required.
For Windows
Stop MDSS services
Increase Nginx Timeout Create a backup of the nginx configuration file at
C:\Program Files\OPSWAT\MetaDefender Storage Security\webclient\default.conf, then edit the default.conf file Add or modify the following values in the appropriatelocationorhttpblock:
Increase PostgreSQL Timeout Edit the MDSS environment configuration file at
C:\Program Files\OPSWAT\MetaDefender Storage Security\config\customer.envModify thePOSTGRESQL_URLparameter to include increased timeout values. Example:
Start MDSS services
For Linux
Stop MDSS service
Increase Nginx Timeout Run the bellow command
This will create a backup of the config file /etc/mdss/webclient/default.confand increase the nginx timeout to 300ms
Increase the timeout for the PostgreSQL database by modifying the
POSTGRESQL_URLin the/etc/mdss/customer.envfile:Set
Timeoutto 300.Set
CommandTimeoutto 300.
Here's an example of how the POSTGRESQL_URL should look:
Start MDSS service
Increasing the timeout allows long-running report queries to complete successfully.
If the issue occurs frequently, it may indicate:
very large report datasets
insufficient database resources
missing database indexes
In those cases, further database performance tuning may be required.
If Further Assistance is required, please proceed to log a support case or chatting with our support engineer.