Search code examples
javawso2wso2-esbwso2-enterprise-integratorwso2-micro-integrator

WSO2 Micro Integration Socket Hang Up


I have a problem. I am using WSO2 Micro Integration 4.1. I am sending request after "STATE_DESCRIPTION = Socket Timeout occurred after accepting the request headers and the request body, INTERNAL_STATE = REQUEST_DONE, DIRECTION = REQUEST, CAUSE_OF_ERROR = Connection between the client and the EI timeouts, HTTP_URL = /api/v1/test, HTTP_METHOD = POST, SOCKET_TIMEOUT = 180000, CLIENT_ADDRESS = /127.0.0.1:52694" is return my console and Error: socket hang up is return from postman. I tried http.connection.disable.keepalive=true in passthru-http.properties. I need help.

I tried http.connection.disable.keepalive=true in passthru-http.properties


Solution

  • As the description suggests this happened due to connection got time out. If you are having slow performing backend you can increase the timeout so that the server will wait until the response. As an example following is the config to increase the synapse global timeout.

    [synapse_properties]
    'synapse.global_timeout_interval'=3000
    

    Please note that you need to add the configurations on the deployment.toml file not in the passthru-http.properties file.

    In that case if you want to make suggested change on the keep-alive settings, Do it as follows on the deployment.toml file.

    [transport.http]
    socket_timeout = 180000   # timeout in milliseconds
    disable_connection_keepalive = true
    connection_timeout = 90000 # in milliseconds
    

    Apart from Check whether the 52694 port is accessible too as the server is localhost means that it is the same server as the MI is running.