Support Article

Connect-SOAP timeout is not working

SA-30254

Summary



User is on Pega 7.1.7 and reported that the SOAP connector is not timing out per the value configured in response timeout field in Connect-SOAP rule form when connecting to an invalid endpoint URL.

Although response timeout is set on a Connect-SOAP rule, but the connection times out after longer duration than the set timeout value.


Error Messages



Not applicable


Steps to Reproduce

  1. Create a SOAP connector.
  2. Configure it to connect to an invalid endpoint to which connection is established but it does not respond back. 
  3. Configure 120 seconds as timeout in the response timeout field of Connect-SOAP rule form.
  4. Run the tracer and Invoke the SOAP connector from an activity.
  5. In the tracer logs one can see the InvokeAxis2 activity failing after 85 seconds where-as user had configured the response timeout value as 120 seconds.


Root Cause



The reported behavior is not related to any problem within Pega product. The system is behaving per design.

Resolution



Here’s the explanation for the reported behavior: 

Timeout value configured on connector rule form is both socket timeout and connection timeout. If this timeout duration configured on rule form is less than the actual time taken by service to respond, then socketTimeout exception is thrown at client side itself (in socket implementation) and all the connection resources are released properly and connection retry does not happen after that. But If the connection timeout value configured on rule form is more than service response time then it can end up in two ways:

  1. Valid URL - Connection is established and service is sending some response – In this case the connection will timeout per configured value on rule form if the service does not respond within configured time.
  2. Invalid URL - Connection failed and connect exception is returned - In this scenario some exception is thrown and HttpClient retries to establish connection 3 more times with the same timeout value.

For example: 
Let's assume that a service takes 21 seconds to return connection exception.

  • If timeout set on rule form is 20 seconds – In this case SocketTImeoutException is thrown at client side itself after 20 seconds and we can see error response screen. This is because the configured timeout value on rule form is within ~21 seconds (which is the time taken by service to return error response)
  • If timeout set on rule form is 60 seconds (which is more than the 21 seconds of time needed by service to return error response) – In this case the service URL sends some error response after 21 seconds. After this system retries to establish connection for 3 more times. On each attempt it takes 21 seconds (which is time needed by service to send error response). The final timeout in this case occurs after 4*21 seconds (~ 85 seconds).

 

Suggest Edit

Published November 15, 2016 - Updated October 8, 2020

Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.