Discussion (2)3
Log in or sign up to continue

You can increase the timeout for CSP Gateway calls, specifically for individual pages or requests, without changing the default configuration of the CSP Gateway.

In the CSP code, use the Timeout property to specify the timeout for the page. This property changes the server response timeout for a specific CSP page only, allowing you to execute long-running operations like expensive SQL queries without impacting the default CSP Gateway timeout settings. For example:

Property Timeout As %Integer;

You can set this property in the OnPreHTTP() method of the page as follows:

ClassMethod OnPreHTTP() As %Boolean
{
    S %response.Timeout = 120 // Set timeout to 2 minutes
    Q 1
}

This ensures the CSP Gateway waits for a longer duration before reporting a timeout for the response. Ensure to reset this setting if not required for subsequent requests, as the default timeout incentivizes efficient server-side code [1].

Sources:

Try setting the Timeout property in %respone (instance %CSP.Ressponse class):

Can be set in the OnPreHTTP() method of a page in which case this changes the amount of time the CSP gateway will wait for a response from the server in seconds before it reports the 'Server is not responding' error message. This is useful if you know that this page is doing an expensive SQL query that will take a couple of minutes and you want to set the server response timeout on the CSP gateway to a minute and yet wait three minutes for this page to respond. It will just change the server response timeout for this page only. If not set the the CSP gateway uses its default timeout value specified in the CSP gateway configuration.