[NTLUG:Discuss] How to set process file limit?
Cameron, Thomas
Thomas.Cameron at bankofamerica.com
Fri Mar 5 11:49:36 CST 2004
> -----Original Message-----
> From: Neil Aggarwal [mailto:neil at JAMMConsulting.com]
> Sent: Thursday, March 04, 2004 5:27 PM
> To: NTLUG
> Subject: [NTLUG:Discuss] How to set process file limit?
>
>
> Hello:
>
> I am getting a message from tomcat running on my
> RedHat 9 box that says "Too Many Open Files".
>
> When I do ulimit -aH, I get:
>
> core file size (blocks, -c) unlimited
> data seg size (kbytes, -d) unlimited
> file size (blocks, -f) unlimited
> max locked memory (kbytes, -l) unlimited
> max memory size (kbytes, -m) unlimited
> open files (-n) 1024
> pipe size (512 bytes, -p) 8
> stack size (kbytes, -s) unlimited
> cpu time (seconds, -t) unlimited
> max user processes (-u) 7168
> virtual memory (kbytes, -v) unlimited
>
> Reading on the internet, I added this line to
> /etc/security/limits.conf:
>
> * hard nofile 10240
>
> and rebooted the server.
>
> But, when I login and try the ulimit -aH command again,
> I still get 1024 for the open files limit.
>
> Any ideas why this did not work?
> What can I do to increase it?
>
> Thanks,
> Neil
You might also change the:
#define __FD_SETSIZE 1024
line in /usr/src/linux-2.4/include/linux/posix_types.h
Then recompile your kernel. You need to make sure you understand all the ramifications of making this change. To be honest, I am not 100% sure what that might do.
--
Thomas Cameron, RHCE, CNE, MCSE, MCT
Assistant Vice President
Linux Design and Engineering
Bank of America
(972) 997-9641
The opinions expressed in this message are mine alone and do not necessarily reflect the opinions of my employer, Bank of America.
More information about the Discuss
mailing list