0

Sending a SOAP request to a published service on WSO2 API (1.6.0), in this case a 5 MB XML text, the server does not respond correctly. We expect a normal SOAP response. If we send the request directly to the backend server, the message is processed succesfully. What could be wrong.

The log files of WSO2 AM, wso2carbon.log, shows the following message:

TID: [0] [AM] [2014-05-05 16:01:35,007]  WARN {org.apache.synapse.transport.passthru.SourceHandler} -  Illegal incoming connection state: REQUEST_DONE . Possibly two send backs are happening for the same request {org.apache.synapse.transport.passthru.SourceHandler}
TID: [0] [AM] [2014-05-05 16:01:35,012]  WARN {org.apache.synapse.transport.passthru.SourceHandler} -  Trying to write response body while the handler is in an inconsistent state REQUEST_DONE {org.apache.synapse.transport.passthru.SourceHandler}
TID: [0] [AM] [2014-05-05 16:01:35,013] ERROR {org.apache.synapse.transport.passthru.SourceHandler} -  Unexpected I/O error: java.nio.channels.ClosedChannelException {org.apache.synapse.transport.passthru.SourceHandler}
java.nio.channels.ClosedChannelException
        at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:265)
        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:474)
        at org.apache.http.nio.reactor.ssl.SSLIOSession.sendEncryptedData(SSLIOSession.java:339)
        at org.apache.http.nio.reactor.ssl.SSLIOSession.outboundTransport(SSLIOSession.java:419)
        at org.apache.http.impl.nio.reactor.AbstractIODispatch.outputReady(AbstractIODispatch.java:150)
        at org.apache.http.impl.nio.reactor.BaseIOReactor.writable(BaseIOReactor.java:181)
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:346)
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:320)
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:280)
        at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106)
        at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:604)
        at java.lang.Thread.run(Thread.java:744)
TID: [0] [AM] [2014-05-05 16:01:35,040]  WARN {org.apache.synapse.transport.passthru.SourceHandler} -  Illegal incoming connection state: REQUEST_DONE . Possibly two send backs are happening for the same request {org.apache.synapse.transport.passthru.SourceHandler}
TID: [0] [AM] [2014-05-05 16:01:35,042]  WARN {org.apache.synapse.transport.passthru.SourceHandler} -  Trying to write response body while the handler is in an inconsistent state REQUEST_DONE {org.apache.synapse.transport.passthru.SourceHandler}
TID: [0] [AM] [2014-05-05 16:01:35,042] ERROR {org.apache.synapse.transport.passthru.SourceHandler} -  Unexpected I/O error: java.nio.channels.ClosedChannelException {org.apache.synapse.transport.passthru.SourceHandler}

The request is as follows:

 <soapenv:Envelope
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">   
 <soapenv:Header/>    <soapenv:Body>
       <leesAanvraag>
          <aanvraagNummer>123</aanvraagNummer>
       </leesAanvraag> ... repeat until size of message is 5M
       <leesAanvraag>
          <aanvraagNummer>123</aanvraagNummer>
       </leesAanvraag>
       <leesAanvraag>
          <aanvraagNummer>123</aanvraagNummer>
       </leesAanvraag>          
  </soapenv:Body> </soapenv:Envelope>

Update: I tried a payload with 32KB, after several times sending this payload, the error occurs and WSO2 API manager does not give a correct response.

  <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope 
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode
 xmlns:axis2ns1="http://schemas.xmlsoap.org/soap/envelope/">axis2ns1:Server</faultcode><faultstring>Error
 in 
 Sender</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>

Could it be related to this issue or this?

Community
  • 1
  • 1
Marc
  • 524
  • 5
  • 19

1 Answers1

1

Please ingress the timeout value in /repository/conf/passthru-http.properties

http.socket.timeout=120000 (default value is 60000, 120000 is the value we use for load test)

Vanji
  • 1,696
  • 14
  • 23