hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajat Sharma" <rsha...@airvana.com>
Subject RE: CLOSE_WAIT harmful?
Date Fri, 31 Mar 2006 19:23:32 GMT
Running out of sockets...no problem....increase the number of sockets by running the command
"ulimit" Increase the hard limit by using -h option



-----Original Message-----
From: John Buren Southerland [mailto:john@southerland-consulting.com]
Sent: Friday, March 31, 2006 11:00 AM
To: HttpClient User Discussion
Subject: Re: CLOSE_WAIT harmful?


Oops, sent before I finished, due to context switching while reading
emails.  the only problem with close wait sockets is if you run out of
available sockets due to too many sockets timing out in the tcp stack.
most OSs limit the number of sockets to the file descriptor limit, so a
load generator or a web server would see the most harm from innefficient
close wait timeout.
There, now off to the next email ;)

On Fri, 2006-03-31 at 10:53 -0500, John Buren Southerland wrote:

> Steve,
> Every socket connection you close goes into a close wait state.  The
> operating system is keeping those closed sockets around just in case the
> connection gets reused.  you can set your close wait timeout to whatever
> you like, I recommend about 3 seconds, it of course is different
> depending on which os you are on.  On some OSs like AIX the default is
> huge, even Solaris is pretty long.  Linux is probably, by default,
> shorter.  It is a standard tunable on most web server install docs.
> Good Luck, John
> 
> On Fri, 2006-03-31 at 10:26 -0500, Steve Terrell wrote:
> 
> > My httpclient-based application is leaving connections in a CLOSE_WAIT
> > state. I am running HttpClient 3.0, using a single instance of
> > HttpClient and MultiThreadedConnectionManager. Each request created its
> > own HttpState and PostMethod objects, which are used to call a Tomcat
> > servlet. 
> > 
> >  
> > 
> > >From what I have read, I can force connections to close through various
> > methods. However, are sockets in a CLOSE_WAIT state really harmful?
> > 
> >  
> > 
> > Steve Terrell
> > 
> > GuideWorks, LLC, Radnor
> > 
> > 610.535.4332 (v)
> > 
> > 610.304.3610 (c)
> > 
> > 150 N. Radnor-Chester Road  Suite 300C  Radnor, PA 19087
> > 
> >  
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message