2001-02-27 09:33:25

by rsaura

[permalink] [raw]
Subject: increasing the number of file descriptors


I've recently hit a problem with a httpd process running out of space
for more fd.

While I'm seriouly looking for a fd-leak in the php-development
behind the web server, I realized that i didn't know how to increase
this parameter.

Is there any /proc interface for increasing the number of file
descriptors per process?

Must I recompile? maybe changes must be made to files_struct?

I've seen a patch for "variable fd array patch for 2.1.90" from Bill
Hawes, is there a patch for 2.2.x or 2.4.x kernels?


Please CC answers to [email protected]

TAI.

Ra?l Saura.



La informaci?n incluida en el presente correo electr?nico es CONFIDENCIAL,
siendo para el uso exclusivo del destinatario arriba mencionado. Si usted
lee este mensaje y no es el destinatario se?alado, el empleado o el agente
responsable de entregar el mensaje al destinatario, o ha recibido esta
comunicaci?n por error, le informamos que est? totalmente prohibida
cualquier divulgaci?n, distribuci?n o reproducci?n de esta comunicaci?n, y
le rogamos que nos lo notifique, nos devuelva el mensaje original a la
direcci?n arriba mencionada y borre el mensaje.
Gracias.


2001-02-27 09:45:19

by Joseph Bueno

[permalink] [raw]
Subject: Re: increasing the number of file descriptors

[email protected] a ?crit :
>
> I've recently hit a problem with a httpd process running out of space
> for more fd.
>
> While I'm seriouly looking for a fd-leak in the php-development
> behind the web server, I realized that i didn't know how to increase
> this parameter.
>
> Is there any /proc interface for increasing the number of file
> descriptors per process?
>
> Must I recompile? maybe changes must be made to files_struct?
>
> I've seen a patch for "variable fd array patch for 2.1.90" from Bill
> Hawes, is there a patch for 2.2.x or 2.4.x kernels?
>
> Please CC answers to [email protected]
>
> TAI.
>
> Ra?l Saura.
>
> La informaci?n incluida en el presente correo electr?nico es CONFIDENCIAL,
> siendo para el uso exclusivo del destinatario arriba mencionado. Si usted
> lee este mensaje y no es el destinatario se?alado, el empleado o el agente
> responsable de entregar el mensaje al destinatario, o ha recibido esta
> comunicaci?n por error, le informamos que est? totalmente prohibida
> cualquier divulgaci?n, distribuci?n o reproducci?n de esta comunicaci?n, y
> le rogamos que nos lo notifique, nos devuelva el mensaje original a la
> direcci?n arriba mencionada y borre el mensaje.
> Gracias.
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

Hi,

You can change per process file descriptor limit with ulimit.

If your processes are using a lot of fds you can increase system wide limits
with:
/proc/sys/fs/file-max
/proc/sys/fs/inode-max

Regards
--
Joseph Bueno
NetClub/Trader.com

2001-02-27 10:10:19

by aprasad

[permalink] [raw]
Subject: Re: increasing the number of file descriptors


> While I'm seriouly looking for a fd-leak in the php-development
> behind the web server, I realized that i didn't know how to increase
> this parameter.

> Is there any /proc interface for increasing the number of file
> descriptors per process?

Yes you can do it in /proc/sys/fs/file-nr

regards,
Anil


2001-02-27 13:33:39

by Alan

[permalink] [raw]
Subject: Re: increasing the number of file descriptors

> Is there any /proc interface for increasing the number of file
> descriptors per process?

No. Use rlimi.

> Must I recompile? maybe changes must be made to files_struct?

Nope. Its all dynamic except for fd_set size, and you should be using poll()
anyway ;)