axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ultan ocarroll (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Created: (AXIS-2030) Singleton getInstance returns new instances each time ?
Date Wed, 01 Jun 2005 12:51:51 GMT
Singleton getInstance returns new instances each time ?
-------------------------------------------------------

         Key: AXIS-2030
         URL: http://issues.apache.org/jira/browse/AXIS-2030
     Project: Axis
        Type: Bug
  Components: Basic Architecture  
    Versions: 1.2    
 Environment: Linux AS2/AS3. Tomcat4. Axis 1.2.
    Reporter: ultan ocarroll


We have an application using Axis1.2 as a client for a SOAP service. 
Over 24 hour periods of time we see many many tcp connections (40000+) being left open to
that service. The connections are in ESTABLISHED state. What is a critical problem is that
on restart, our servers very often report "too many open files" and fail to start or start
with spurious errors.

I suspected originally that our version of Commons HttpClient (3.0rc2) was at fault and found
a reported issue very similar to ours (http://mail-archives.apache.org/mod_mbox/jakarta-httpclient-user/200505.mbox/%3c20050531074109.GA20109@uml24.umlhosting.ch%3e
).
However, the solution is not relevant to our situation (it recommends reverting JDK version
from 1.5 to 1.4.2 - we do this already). 

Looking at the HttpClient code I cant see where the problem is arising. I havent yet contacted
the team behind HttpClient as during investigations Ive come across what seems to be a problem
with singleton instantiation in the CommonsHttpSender. 

I noticed when I set a breakpoint in CommonsHttpSender that I get a new instance for each
request and as a result get a new MultiThreadedHttpConnectionManager on each request, each
with a new connection pool. Im not sure where in the stack this singleton should be managed,
but surely there should only be one instance of CommonsHttpSender or its constructor should
get a singleton reference to MultiThreadedHttpConnectionManager ? Or am I missing something
here ?

Heres the stack trace, if thats any help : 
CommonsHTTPSender.initialize() line: 97
CommonsHTTPSender.<init>() line: 88
NativeConstructorAccessorImpl.newInstance0(Constructor, Object[]) line: not available [native
method]
NativeConstructorAccessorImpl.newInstance(Object[]) line: 39
DelegatingConstructorAccessorImpl.newInstance(Object[]) line: 27
Constructor.newInstance(Object[]) line: 274
Class.newInstance0() line: 308
Class.newInstance() line: 261
WSDDTransport(WSDDTargetedChain).makeNewInstance(EngineConfiguration) line: 157
WSDDTransport(WSDDDeployableItem).getNewInstance(EngineConfiguration) line: 274
WSDDTransport(WSDDDeployableItem).getInstance(EngineConfiguration) line: 260
WSDDDeployment.getTransport(QName) line: 441
FileProvider.getTransport(QName) line: 257
AxisClient(AxisEngine).getTransport(String) line: 332
AxisClient.invoke(MessageContext) line: 163



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message