[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpclient-users
Subject:    RE: CLOSE_WAIT harmful?
From:       "Steve Terrell" <Steven.Terrell () guideworkstv ! com>
Date:       2006-04-03 12:18:23
Message-ID: 19FBA0BAF7AD2F4081C0FE36832A6E845119D8 () GWDC04 ! GuideWorks ! TV
[Download RAW message or body]

It turns out that an errant DHCP server on our network was causing the
problem. We shut off the DHCP server, and the problem went away. 

--Steve
-----Original Message-----
From: Rajat Sharma [mailto:rsharma@airvana.com] 
Sent: Friday, March 31, 2006 2:24 PM
To: HttpClient User Discussion
Subject: RE: CLOSE_WAIT harmful?

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


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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic