axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Ewins <Brian.Ew...@btinternet.com>
Subject Re: Socket problems
Date Tue, 30 Jul 2002 16:10:05 GMT
that does look like a bug - noone else can close that socket as its 
scoped within HttpSender.invoke(); HttpSender is stateless so the only 
way to get hold of the socket would be if it was somehow passed back to 
the client. The obvious hook is to have the socket closed whenever the 
response is read. So the answer is yes, its being left to the garbage 
collector.

It seems likely however that HttpSender will be deprecated in favour of 
CommonsHttpSender (using the commons HttpClient code)[1]. A glance over 
the code of that shows it has the _same_ problem - the HttpConnection 
isnt closed. I can see a point to this if there were multiple message 
being sent over the same connection, but there's not.

I've now reported these:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11296

-Baz

[1] I'm just reading this into the javadoc for CommonsHttpSender, I 
don't have inside knowledge...

Geza.Szocs@nokia.com wrote:
> Hi,
> 
>   During a stability test with Axis, nightly build 2002-07-21 and Tomcat 4.0.4.,
> we experienced the following problem: 
>   We had a webservice deployed under Axis, which functioned
> both as a SOAP server and a client. Meaning that it was capable of
> receiving SOAP requests via HTTP, but also capable of
> sending SOAP requests to other webservices, acting as a SOAP client 
> (using Axis client framework).
> In both way our service was attacked with multiple threads, sending
> around 30-40 requests/sec in both directions. We ecountered that
> after a certain period of time (tipically 4-5 hours) the webserver
> was not able to receive any more HTTP requests. However the client-side
> was still sending SOAP requests to other servers. Analyzing with netstat
> we found that around 2000 sockets have been created by Axis client 
> framework, which were still active, and this number didn't want to
> decrease. It seemed like this client framework was eating up all resources
> of the OS (sockets). I also checked to source code of HTTPSender, I see that socket
> are not closed there. My question is, what happens to the created sockets ?
> Does Axis leave everything to the garbage-collector, or are socket closed 
> later on by some handler ? When can the socket be closed and by whom ? 
> 
>            Thanx in advance for your answers, Geza
> 



Mime
View raw message