On Wed, 10 Jan 2001, Tomás García Ferrari wrote:

> I am running a RedHat 6.2 server that is getting frozen everyday with a
> 'grow_underscores inodes_max limit reached' message. There are a lot of
> lines in /var/log/messages like these:
> >Dec 30 06:48:28 www inetd[1809]: accept (for imap): Too many open files
> >Dec 30 06:48:59 www last message repeated 1780 times
>
> I suppose that a script run by crond could cause this problem and I removed
> all the scripts from /etc/cron.daily. Nevertheless, the server got frozen.
>
> I created a script that runs hourly to get more info:
>   lsof | awk '{ print $1 }' | uniq -c | sort -n >> /home/XXX/trap.log
>   df -i >> /home/XXX/trap.log
>
> but when the server is frozen these commands doesn't have any output...
>
> I am completely lost now... could somebody give me a clue?
>

There's a maximum number of file handles available to the system. 4096 by
default I think.  If you reach that limit (suprisingly doable) then you get
the error message you're seeing.  To check this...

bash# cat /proc/sys/fs/file-nr
1577    474     4096

... which gives, the ammount allocated (/approximate/ highwater mark), the
current level, and the maximum.  Also (since the error message referes to
inodes) there is also..

bash# cat /proc/sys/fs/inode-nr
16392   1961

... which gives the ammount allocated (/approximate/ highwater mark) and the
amount remaining.  The max possible is got from inode-max...

bash# cat /proc/sys/fs/inode-max
16384

... which can be slighty less than the actual number allocated because
allocation is done in 'chunks'.

Assuming this is your problem you can increase it (say, double it) by...

echo 8192 > /proc/sys/fs/file-max
echo 32768 > /proc/sys/fs/inode-max

... which can be done at run time and takes effect immediatly.  This is teh
readers digest version anyway.  All the gory details can be read about in
/usr/src/linux/Documentation/sysctl/fs.txt

M.

-- 
WebCentral Pty Ltd           Australia's #1 Internet Web Hosting Company
Level 1, 96 Lytton Road.           Network Operations - Systems Engineer
PO Box 4169, East Brisbane.                       phone: +61 7 3249 2583
Queensland, Australia.                            pgp key id: 0x900E515F





_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to