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

  1. Stop MDSS services
  2. 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 appropriate location or http block:
Copy
  1. Increase PostgreSQL Timeout Edit the MDSS environment configuration file at C:\Program Files\OPSWAT\MetaDefender Storage Security\config\customer.env Modify the POSTGRESQL_URL parameter to include increased timeout values. Example:
Copy
  1. Start MDSS services

For Linux

  1. Stop MDSS service
Copy
  1. Increase Nginx Timeout Run the bellow command
Copy

This will create a backup of the config file /etc/mdss/webclient/default.confand increase the nginx timeout to 300ms

  1. Increase the timeout for the PostgreSQL database by modifying the POSTGRESQL_URL in the /etc/mdss/customer.env file:
    • Set Timeout to 300.
    • Set CommandTimeout to 300.

Here's an example of how the POSTGRESQL_URL should look:

Copy
  1. Start MDSS service
Copy
  • 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.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard