Axis web service hangs because connection is not returning

I have an Axis 1.4 web service client (with Spring) that uses the PHP web service (runs on Apache). This works fine in a development environment, but in a production environment, code runs somewhere in the Axis library immediately after the client receives a SOAP response. I identified with Wireshark that the only difference from the client’s perspective is that in the development environment, the HTTP header of the SOAP response contains an entry


Connection: close

which is not in the production environment. My assumption is that it is for this reason that the code is executed because Axis expects the connection header to close.

Is there something I can do to fix this by setting up a client? If not, you will be advised with any tips on configuring Apache + PHP to properly close the connection.

+1
source share
2 answers

Try setting the application -Dhttp.keepAlive = false in the application if you can disable saving in other parts of the application. This will prevent certain freezes with the HttpClient java inner class by trying to readily populate the BufferedInputStream from an open connection.

See also http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4479751 for more details .

, :

java.lang.Thread.State: RUNNABLE    java.net.SocketInputStream.socketRead0 ( )    java.net.SocketInputStream.read(SocketInputStream.java:129)    java.io.BufferedInputStream.fill(BufferedInputStream.java:218)    java.io.BufferedInputStream.read1 (BufferedInputStream.java:258)    java.io.BufferedInputStream.read(BufferedInputStream.java:317)   - < 0xab82fa30 > (java.io.BufferedInputStream)   at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)   at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1072)   - < 0xab82c838 > (sun.net.www.protocol.http.HttpURLConnection)

http.keepAlive , HttpClient ": ", HeavyWave.

+4

Http Header "Connection: close" .

+2

Source: https://habr.com/ru/post/1725422/


All Articles