The default HTTP timeout for API queries is 5 seconds to connect to the NOC-PS server and the maximum execution time is 25 seconds. The execution time indicates how long the module waits for the return of values from the API.

If the limit is too low - which should hardly be the case - you can overwrite it using the customconfig.php file.

How to increase the timeout limits

The limits can be overwritten via the customconfig.php file, which is located at /modules/servers/dedicated/

  • Navigate into the directory /modules/servers/dedicated/
  • Open the file customconfig.php, or create the file if it does not exist
  • Insert following line and save the file:

    $curl_runtime_timeout = 30;
    $curl_connect_timeout = 10;
  • If the file was newly created, you need to add a PHP tag at the beginning:

    <?php
    $curl_runtime_timeout = 30;
    $curl_connect_timeout = 10;

In this example, the allowed execution time has been increased to 30 seconds and the maximum time to connect to the API has been increased to 10 seconds.

  • No labels