Sean Boudreau(deleted)
|
Re: unable to create more than 995 sockets filedescriptors
|
Sean Boudreau(deleted)
10/15/2008 8:31 AM
post14999
|
Re: unable to create more than 995 sockets filedescriptors
On Wed, Oct 15, 2008 at 08:19:47AM -0400, Rosen Rosen wrote:
> hi
>
> my program creates a number of active sockets transmitting data to a server at periodic intervals. I get the error
>
> socket error : Too many open files // errno 24 EMFILE
> ( this happens at the 996th socket call )
>
> when i try to create about a 1000 connections at the client side.
> well i did check out the the ulimit which was set to 1000.
> so i increased it up to 2000 using the ulimit -n 2000 command.
>
> apart form that i also used the call setrlimit(RLIMIT_NOFILE, &curr_limits) where curr_limits contains 2000 for both soft n hard limit.
> the next call getrlimit returns 2000 for both.
>
> but still in the next run i get the same error at the 996th socket call again.
>
> i tried the getconf _SC_OPEN_MAX it still showed 1000 as the o/p despite the ulimit showing 2000 as the limit.
>
> any of u guys have a idea as to what may be wrong or how to increase the fd limit.
>
> regards,
> Rosen.
Try the -F option to procnto.
-seanb
|
|
|