axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norris Merritt <norris.merr...@peregrine.com>
Subject RE: HTTP Connections Hanging
Date Mon, 17 Mar 2003 21:35:34 GMT
Axis 1.1 beta did not support Keep-Alive, although the current release
candidate may. It was my pursuit of Keep-Alive that led me to the
conclusions below. After investigating, I came up with a patch which worked
for me, but was not thread-safe, among other things. Eric Friedman posted a
better fix which I believe has been accepted and may be in the current
release candidate, not sure. See bug 16522 for details.

-----Original Message-----
From: Davis, Kevin [mailto:KDavis@ironmountain.com]
Sent: Monday, March 17, 2003 1:20 PM
To: 'Norris Merritt'; 'axis-user@ws.apache.org'
Subject: RE: HTTP Connections Hanging


If I understand you correctly, the SOAP server needs to explicitly close the
connection for the Axis Client to close its connection.  What if the SOAP
server is HTTP 1.1 and uses Keep-Alive?  Do I need to disable Keep-Alive?
Will that even make a difference?

Kevin

-----Original Message-----
From: Norris Merritt [mailto:norris.merritt@peregrine.com]
Sent: Monday, March 17, 2003 4:15 PM
To: 'axis-user@ws.apache.org'
Cc: Davis, Kevin
Subject: RE: HTTP Connections Hanging


I believe that Axis client code relies on the remote web server to close the
connnection. The XML response from the SOAP server is not read into memory
and then parsed, it is parsed as it is read from the network. Unless the
remote server closes the connection, Xerces will cause a hang trying to read
more XML from its InputSource, which is tied to a SocketInputStream which
underlies it. Fundamentally, an HTTP 1.0 client should not try to read more
than "Content-Length" bytes or a hang may occur. I think the reason that
Axis clients do not usually hang is that the remote server observes the HTTP
version of 1.0 and/or a specific "Connection: close" header sent by the Axis
client and so closes the connection, and this causes the SocketInputStream
on the Axis client to close, which causes Xerces to return.

-----Original Message-----
From: Davis, Kevin [mailto:KDavis@ironmountain.com]
Sent: Monday, March 17, 2003 11:48 AM
To: 'axis-user@ws.apache.org'
Subject: RE: HTTP Connections Hanging


I took some time to look through the code and I can see the places where the
problems may be, but, like the comments state, is InputStream.close() being
called?  Also, how do we close the socket if we need to leave it open after
we exit invoke()?  Before anything can be done, we need these questions
answered.

Kevin

-----Original Message-----
From: Davis, Kevin 
Sent: Monday, March 17, 2003 1:23 PM
To: 'axis-user@ws.apache.org'
Subject: RE: HTTP Connections Hanging


I'm surprised too, but trying to patch it is just not an option for me here.
So I guess someone with some more time than us, and maybe a bit more
familiar with the code, can take a look.  I'm also a bit concerned that that
last bug message states that it is not a critical issue.  I see this as a
major issue with anyone doing any real work with Axis.  

I'll take a look at the code and see what I can come up with.

Kevin

-----Original Message-----
From: Brian Ewins [mailto:Brian.Ewins@btinternet.com]
Sent: Monday, March 17, 2003 1:02 PM
To: axis-user@ws.apache.org
Subject: Re: HTTP Connections Hanging


Yes and no. I think the 'known issue' you're referring to may be my bug 
report:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11296

The bugs are, I think, in the HttpSender code:
<http://cvs.apache.org/viewcvs.cgi/xml-axis/java/src/org/apache/axis/transpo
rt/http/HTTPSender.java?rev=1.94&content-type=text/vnd.viewcvs-markup>
<http://cvs.apache.org/viewcvs.cgi/xml-axis/java/src/org/apache/axis/transpo
rt/http/CommonsHTTPSender.java?rev=1.14&content-type=text/vnd.viewcvs-markup
>

Hope this points you in the right direction, but no, I never got around 
to writing a second patch.

When it came down to it, I don't understand all the intents in this code 
- particularly, what's supposed to be pooled where - and life is even 
more complicated with keepalives. I didn't have time then (or now) to 
figure it out.

I'm not sure why this doesnt bite everyone - possibly the sockets that 
are left open are closing when exceptions are thrown but the socket has 
dropped out of scope.

-Baz

Davis, Kevin wrote:
> Anyone else have any suggestions, workarounds for this?
> 
> Kevin
> 
> -----Original Message-----
> From: Davis, Kevin 
> Sent: Friday, March 14, 2003 1:19 PM
> To: 'axis-user@ws.apache.org'
> Subject: RE: HTTP Connections Hanging
> 
> 
> I think much of the issue I'm having is around the bug pertaining to
> Xerces/Axis still holding the connection open to ensure that all the bytes
> have been recieved.  But it does sound similar, but I'm letting Axis do
all
> the socket stuff.
> 
> Kevin
> 
> -----Original Message-----
> From: Kevin.Bedell@sunlife.com [mailto:Kevin.Bedell@sunlife.com]
> Sent: Friday, March 14, 2003 11:35 AM
> To: axis-user@ws.apache.org
> Subject: Re: HTTP Connections Hanging
> 
> 
> 
> 
> I ran into a similar problem using Weblogic while doing some low-level TCP
> socket communications. It turns out that whenever a socket timeout occured
> I was handling the Exception - but not specifically 'closing' the socket
in
> a "finally{}" clause. As a result the sockets chewed up my weblogic
threads
> until they were gone.
> 
> Not sure if this applies exactly - it may be a piece of the puzzle...
> 
> Kevin
> 
> 
> 
> 
>  
> 
>  
> 
>              "Davis, Kevin"                    To:
> "'axis-user@ws.apache.org'" <axis-user@ws.apache.org>
> 
>              <KDavis@ironmountain.com>         cc: (bcc: Kevin
> Bedell/Systems/USHO/SunLife)                                            
>              03/14/2003 10:53 AM               Subject:  HTTP Connections
> Hanging                                                      
>              Please respond to axis-user
> 
>  
> 
>  
> 
> 
> 
> 
> 
> I've been looking through the past messages and the Apache Axis bugzilla
> database and it appears that the issue surrounding HTTP Connections
> "hanging" is a known issue.  What is the easiest way to get around this
> issue?
> 
> I'm expieriencing some rather interesting problems surrounding this.  I
> have
> an app, running on Weblogic 7.0.1 using an Axis client to call a MS-SOAP
> C++
> service on Win2K.  I am noticing the thread count in Weblogic continues to
> grow steadily over time and eventually runs out.  After doing a thread
> dump,
> Weblogic shows that all of those thread are in the Axis Client "hanging"
> waiting for the HTTP connection to close.  Any suggestions would be
> appreciated.
> 
> Kevin Davis
> 
> 
> 
> 
> 
>
---------------------------------------------------------------------------
> This e-mail message (including attachments, if any) is intended for the
use
> of the individual or entity to which it is addressed and may contain
> information that is privileged, proprietary , confidential and exempt from
> disclosure.  If you are not the intended recipient, you are notified that
> any dissemination, distribution or copying of this communication is
> strictly prohibited.  If you have received this communication in error,
> please notify the sender and erase this e-mail message immediately.
>
---------------------------------------------------------------------------
> 
> 

Mime
View raw message