OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Too many open files

From: Arya, Manish Kumar (m.aryayahoo.com)
Date: Tue Dec 12 2006 - 05:29:33 CST


Hello,

check ulimit

roothost:/# ulimit -n
256

this is the limit of max opened files for system

you should increase this limit

by

roothost:/# ulimit -n 65536

rootnms4:/# ulimit -n
65536

reload postfix

regards,
-manish

--- Robert Fitzpatrick <listswebtent.net> wrote:

> Been having this issue with too many open files,
> 350-400 processes
> running constantly. Noel suggested that if after the
> default max_idle
> and max_use limits are reached, I still have over
> 400 processes running,
> it is one of these three things:
>
> - You still have a large number of active
> connections; check with
> netstat or lsof
> - postfix max_idle is set to some (large?)
> non-default value; check
> with "postconf max_idle"
> - something on your system is is broken and
> preventing processes from
> exiting.
>
> I believe perhaps it is the first item due to the
> last item causing my
> problem, but just not sure. This happened to me once
> before on a
> different server, I reinstalled the OS after trying
> to figure it out and
> all finally went away, that was probably a year ago.
> I would like to try
> and find what is causing my problem to crop up
> again.
>
> This server is a FreeBSD 6.1 with 1 GB RAM, 3.0 GHz
> processor and RAID 1
> from the ASUS motherboard, I assume is some sort of
> software RAID. The
> other server is a SuperMicro RAID 5 with hot fix
> running 5.4 on dual P4
> processors. It is also starting to run over 400
> processes all the time
> and I feel that it will begin producing too many
> open files soon for the
> second time. I run amavisd-new and SA 3.1.7 with
> Postfix 2.3.4 all
> installed from the FreeBSD ports system. Here is the
> output of lsof:
>
> esmtp# lsof | wc -l
> 19381
> esmtp# lsof | grep postfix| wc -l
> 15634
> esmtp# netstat -na | wc -l
> 2869
> esmtp# netstat -na | grep 25 | wc -l
> 554
>
> Can these numbers normal? And the error message in
> the logs:
>
> Dec 11 21:23:53 esmtp postfix/verify[23621]: fatal:
> socket: Too many open files in system
> Dec 11 21:27:13 esmtp postfix/smtp[30119]: fatal:
> accept connection: Too many open files in system
>
> Just trying to figure out if indeed there is
> something that is always
> broken in my system that causes this, and how to
> find it. Or, processing
> the mail for these 50-75 domains is producing so
> much spam, with all the
> rules. Some of the domains are huge targets for
> spammers and the servers
> do get hammered from time to time. My mail delays
> are running 5-12 per
> message. My loads (<1) and CPU idle (50-80%) are
> fine while all these
> processes are running, but of course, SMTP starts
> taking long, then the
> error message of too many open files.
>
> I truly appreciate any help with how to track down
> the cause of this
> issue.
>
> --
> Robert
>
>

 
____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited