You can raise the file max by just doing:
echo 8192 > /proc/sys/fs/file-max

I tried this, and it stays up longer, but still eventually runs out of file
handles.  Each apache process takes 8 file handles, I assume rmserver is
around 4 or 5 since I see about 1/4 or 1/5 tcp connections closing as I have
max file handles.

These connections are sticking around for more than 120 seconds though.
I'll go back and grep for some ip that was listed yesterday, and it will
still be in the state CLOSE.  

> -----Original Message-----
> From: Jason DeStefano [mailto:destef at destef.com]
> Sent: Tuesday, January 30, 2001 7:03 PM
> To: tclug-list at mn-linux.org
> Subject: Re: [TCLUG] tcp connections not closing properly
> 
> 
> TCP connections stay in a closed state for 120 seconds according
> to the RFC for TCP. This ensures that "rouge" packets still on the
> network dont confuse your IP stack. After 120 seconds they should
> clear out automatically. If you run a process that opens and closes
> lots of tcp connections this could be a problem because by default
> your limited to i believe 1024 simultaneos TCP connections. I ran into
> the problem when i ran an rc5 keyserver and i did a huge dump of
> keys. It would error out saying I dont have anymore connections
> available. I'd have to wait a few mins for them to clear out.
> Not sure if that number can be uped outside of a kernel recompile.
> ulimit -a shows 1024 files max. i dont know if this number
> is used for tcp connections too. (i doubt it).
> 
> If this isn't your problem then you may have a messed up system
> or hardware problems.
> 
> Hope this helps.
> 
> Jason
> 
> 
> At 01:32 PM 1/30/01 -0600, you wrote:
> >I have a box that is not properly closing out it's tcp 
> connections.  If I do
> >a netstat --inet, it comes up with over 1700 connections in 
> the state CLOSE.
> >lsof shows all of these using up my file handles, and I am 
> having trouble
> >starting new processes on the box so I have to reboot it.
> >
> >Does anyone know how I can fix this?  I have 2 machines 
> which are identical
> >to this one and they don't have any problems.  
> >
> >Jay
> >_______________________________________________
> >tclug-list mailing list
> >tclug-list at mn-linux.org
> >https://mailman.mn-linux.org/mailman/listinfo/tclug-list
> > 
> 
> _______________________________________________
> tclug-list mailing list
> tclug-list at mn-linux.org
> https://mailman.mn-linux.org/mailman/listinfo/tclug-list
>