OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Postfix Archives: 451 queue errors due to max open files on Lin

451 queue errors due to max open files on Linux


Subject: 451 queue errors due to max open files on Linux
From: Rich Graves (rcgravesbrandeis.edu)
Date: Thu Jan 20 2000 - 18:08:37 CST


I see three not entirely resolved threads about "451 queue errors." This
might be relevant.

I've got a 3000-user mail server sharing a 100mbps LAN with a Lyris list
server that is very... efficient about sending lots of copies of a message
simultaneously. Lyris spawns a new message-id per recipient in order to
support failsafe automatic bounce handling. Stupid, but effective.

Every once in a while, when Lyris is feeding us around 100 messages per
second (which postfix handles much better than sendmail on the same
hardware, thanks), postfix gives me "Out: 451 Error: queue file write
error." In the logs I find an impressive number of messages queued with
the same timestamp and:

Jan 20 17:49:07 moe postfix/smtpd[19436]: fatal: accept connection: Too
 many open files in system
Jan 20 17:49:07 moe postfix/master[557]: warning: process
 /usr/libexec/postfix/smtpd pid 19497 exit status 1
Jan 20 17:49:07 moe postfix/master[557]: warning:
 /usr/libexec/postfix/smtpd: bad command startup -- throttling
Jan 20 17:49:07 moe postfix/master[557]: warning: process
 /usr/libexec/postfix/cleanup pid 19498 exit status 1
Jan 20 17:49:07 moe postfix/cleanup[19470]: warning: mail_scan_any: got
 EOF; expected: integer
Jan 20 17:49:07 moe postfix/cleanup[19470]: warning: 75D69269AF: skipping
 further client input
Jan 20 17:49:07 moe postfix/master[557]: warning:
 /usr/libexec/postfix/cleanup: bad command startup -- throttling

Which isn't too surprising given that Linux 2.2 defaults to 4096 open files
and the growing numbers of IMAP users eat nearly 3000 descriptors around
the clock.

We never hit open file limits with sendmail because load would spike and
we'd go queue-only (if not refuse connections entirely) much earlier no
matter how I tuned the config.

Here's what I've done. Let me know if this is clearly stupid.

 * Quadruple the kernel open file limit (echo 16384 > /proc/sys/fs/file-max)

 * Reduce maxproc for smtpd from 50 to 40 (necessary after the above?)

 * Reduce maxproc for local from 50 to 40 (necessary?)

What exactly does "throttling" mean? It didn't stop accepting connections.

-- 
Rich Graves <rcgravesbrandeis.edu>
UNet Systems Administrator



This archive was generated by hypermail 2b27 : Thu Jan 20 2000 - 18:10:38 CST