2

We are trying to build an application that MI is responsible for invoking a service then receiving the response and doing CRUD with this response. But the service takes too much time like more than 5 mins. I am trying to increase timeout. I tried to increase flags like these;

synapse.properties:

socket_timeout = 720000 // did not work
connection_timeout = 720000 // did not work
io_buffer_size = 65536 // may be response size affect did not work

passthru-http.properties:

synapse.global_timeout_interval = 720000 // did not work

endpoint xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <endpoint name="ISScraper" xmlns="http://ws.apache.org/ns/synapse">
        <address uri="$SYSTEM:isEndpoint">
            <timeout>
                <duration>600000</duration> // did not work
            </timeout>
            <suspendOnFailure>
                <errorCodes>-1</errorCodes>
                <initialDuration>0</initialDuration>
                <progressionFactor>1.0</progressionFactor>
                <maximumDuration>0</maximumDuration>
            </suspendOnFailure>
            <markForSuspension>
                <errorCodes>-1</errorCodes>
                <retriesBeforeSuspension>0</retriesBeforeSuspension>
            </markForSuspension>
        </address>
    </endpoint>

Always taking the 101505 "Connection closed" error and every time it gives the error 5 mins after the call is made:

[2022-03-22 14:08:23,829]  WARN {TargetHandler} - ERROR_CODE = 101505, STATE_DESCRIPTION = Connection closed by target host after Server written the request headers and the request body to the backend, INTERNAL_STATE = REQUEST_DONE, DIRECTION = REQUEST, CAUSE_OF_ERROR = Connection between the Server and the BackEnd has been closed, TARGET_HOST = 3.134.125.175, TARGET_PORT = 80, TARGET_CONTEXT = http://54ce-94-54-20-33.ngrok.io/credit-cards/start, HTTP_METHOD = POST, TRIGGER_TYPE = api, TRIGGER_NAME = Synchronization, REMOTE_ADDRESS = 54ce-94-54-20-33.ngrok.io/3.134.125.175:80, CONNECTION = http-outgoing-7
Tue Mar 22 14:08:23 GMT 2022 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

enter image description here

Also we are dockerizing the MI project. Changed all flags inside deployment.toml. And then up and tested it for every flag change. Because of 101505 "Connection closed" error , I tried the ;

disable_connection_keepalive = true // did not work
and 
disable_connection_keepalive = false// did not work

How can we increase timeout?

Community
  • 1
  • 1
  • Are you changing these values in deployment.toml file? Or are you changing them directly in the respective files? Changing them directly will not work. – Arunan Sugunakumar Mar 22 '22 at 15:38
  • @ArunanSugunakumar thanks for your comment, I am changing them inside deployment.toml – Dilara Şeyma Şahbaz Mar 22 '22 at 16:17
  • Setting timeout won't work, because that is not timeout issue - which should be `ERROR_CODE = 101504`. And you got information that `REQUEST_DONE` with information: Connection closed **by target host**. I suggest to provide more information what do you want to achieve. The MySql response is weird in context to http POST call. – tmoasz Mar 23 '22 at 10:37
  • @tmoasz thanks for your comment, I am trying to invoke a nodejs service but it is async because it is web scraping so I thought I need to make WSO2 more patient. Is there anything else I can share for your help? – Dilara Şeyma Şahbaz Mar 23 '22 at 11:52
  • @DilaraŞeymaŞahbaz : How did you manage to fix this eventually ? – khalidmehmoodawan Mar 03 '23 at 14:57
  • @khalidmehmoodawan I could not – Dilara Şeyma Şahbaz Mar 16 '23 at 12:13

0 Answers0