function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
purnachander pasunuripurnachander pasunuri 

why salesforce not allows to taking response from Snaplogic if response time is more than 20 sec. Gateway closed 502 (even i set max timeout 120 sec)

Below message Snaplogic getting while sending response to salesforce(salesforce forcefully closes connection)
Encountered an error while sending response to triggered task client
Reason: An existing connection was forcibly closed by the remote host
Resolution: Check network connection and make sure the client is fully reading the response

Thanks
 
SwethaSwetha (Salesforce Developers) 
HI Purna,

The default timeout is 10 seconds at salesforce end. The minimum is 1 millisecond and the maximum is 120 seconds. Can you confirm if you have increased the timeout on the HTTP request ?

Example of setting a custom timeout for HTTP callouts using the Apex HTTPRequest object
1 HttpRequest req = new HttpRequest();
2 req.setTimeout(2000); // timeout in milliseconds
 
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you