Sockets left in TIME_WAIT

(no name) ((no email))
9 Oct 96 7:13:14 EDT

Message-Id: <199610091111.HAA05710@vgi3mail.vanguard.com>
To: fastcgi-developers <fastcgi-developers@openmarket.com>
From: Alan Yagoda/VGI
Date:  9 Oct 96  7:13:14 EDT
Subject: Sockets left in TIME_WAIT

We are using a remote managed fastcgi application started with cgi-fcgi.   
It appears that every time a request is issued from the OM Web Server to the 
remote fastcgi application, the  socket descriptor used by the fastcgi 
application is left in a TIME_WAIT state (using 'netstat -a' on Solaris to view 
descriptor state).   Normally setting sockopt() with SO_REUSEADDR on the 
listen() socket descriptor alleviates this problem.   We are using a version of 
cgi-fcgi that sets SO_REUSEADDR but we are still seeing the connections being 
left in TIME_WAIT until the OS cleans up.     We have gotten to the point where 
we can't connect to the fastcgi application because it can't allocate any more 
descriptors.
We had to reconfigure kernal paramteres  using 'ndd' to clean up open 
descriptors more frequently.   I suspect that this is not the correct solution, 
but it has worked so far.    

Has anyone seen this problem?    Any suggestions on how to close the 
connections cleanly?

Thanks.

-Alan

*************************************************************************
Alan Yagoda    Phone:  610 669 1743
Sr. Information Systems Engineer Fax: 610 669 1714
The Vanguard Group   E-Mail: Alan_Yagoda@vanguard.com