We are using WSO2
ESB
to clone and broadcast SOAP requests to all our web services, that are being hosted on IIS
. Recently we switched to nhttp
transport. It was configured as recommended here but each time after the period of inactivity we encount an exception in wso.log
[HTTP Sender I/O dispatcher-4] ERROR ClientHandler I/O error : An existing connection was forcibly closed by the remote host For : 127.0.0.1:4148
java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:197)
...
The length of inactivity period depends on the 'Connection Time-out value'
configured in IIS for the specific web service. Seems like WSO2 ESB hasn't closed all opened socket connections and IIS
did it instead, when the time-out period has expired.
Is there is a way to avoid this exception? It doesn't seem to cause some performance drawbacks, but looks quite messy in the error logs.
Our configuration, responsible for threads count and timeouts is as follow:
nhttp.properties
file:
http.socket.timeout=120000
nhttp_buffer_size=16384
http.tcp.nodelay=1
http.connection.stalecheck=0
http.block_service_list=false
synapse.properties
file:
synapse.threads.core = 40
synapse.threads.max = 100
#synapse.threads.keepalive = 5
#synapse.threads.qlen = 10
#synapse.threads.group = synapse-thread-group
#synapse.threads.idprefix = SynapseWorker
synapse.sal.endpoints.sesssion.timeout.default=600000
synapse.global_timeout_interval=120000