sam
sam

Reputation: 101

Endpoint [ State : SUSPENDED ]

We are facing an issue with wso2 ESB endpoint getting suspended for 3000ms when the URL it tries to invoke is not available for a second, because of this suspension the next calls to the same endpoint gets fail even when the backend URL is available.

Below is the same Log what we get when an endpoint gets suspended and also the endpoint configuration what we are using now.

TID: [-1234] [] [2019-10-30 15:08:39,121]  WARN {org.apache.synapse.endpoints.EndpointContext} -  Endpoint : conf//endpoint/epsomebackendurl with address https://somebackendurl.com will be marked SUSPENDED as it failed
TID: [-1234] [] [2019-10-30 15:08:39,121]  WARN {org.apache.synapse.endpoints.EndpointContext} -  Suspending endpoint : conf//endpoint/epsomebackendurl with address https://somebackendurl.com - current suspend duration is : 30000ms - Next retry after : Wed Oct 30 15:09:09 GMT 2019

Endpoint Configuration
<?xml version="1.0" encoding="UTF-8"?>
<endpoint xmlns="http://ws.apache.org/ns/synapse"
          name="conf//endpoint/epsomebackendurl">
   <property name="System-Name" value="JUNIFER" scope="default" 
type="STRING"/>
   <http uri-template="https://somebackendurl.com"
         method="get">
     <suspendOnFailure>
        <progressionFactor>1.0</progressionFactor>
    </suspendOnFailure>
    <markForSuspension>
        <retriesBeforeSuspension>0</retriesBeforeSuspension>
        <retryDelay>0</retryDelay>
    </markForSuspension>
   </http>
</endpoint>    

Please let me know is there any other option that we can make to stop endpint getting suspended.

We are using wso2esb-5.0.0 version.

Thanks

Upvotes: 1

Views: 3571

Answers (1)

Pramodya Mendis
Pramodya Mendis

Reputation: 726

The default behavior is faulting a request of Synapse endpoint is, the endpoint will suspend for 30000ms.

If you want to stop suspending, the following endpoint is never suspended.

<endpoint name="NoSuspendEndpoint">
   <address uri="http://localhost:9000/services/SimpleStockQuoteService">
       <timeout>
           <duration>30000</duration>
           <responseAction>fault</responseAction>
       </timeout>
       <suspendOnFailure>
           <errorCodes>-1</errorCodes>
           <initialDuration>0</initialDuration>
           <progressionFactor>1.0</progressionFactor>
           <maximumDuration>0</maximumDuration>
       </suspendOnFailure>
       <markForSuspension>
           <errorCodes>-1</errorCodes>
       </markForSuspension>
   </address>

Upvotes: 3

Related Questions