[Exim] daemon: delivery process fork failed: Resource tempor…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Jeremy C. Reed
Dátum:  
Címzett: exim-users
Tárgy: [Exim] daemon: delivery process fork failed: Resource temporarily unavailable
I am running Exim 4.30 and spamassassin 2.63 (using spamc) under Debian
3.0. The Linux kernel is 2.2.20-compact installed with Debian (but "dpkg
--list" doesn't show a kernel.)

The debian packages are:

ii  spamassassin   2.63-0.backpor Perl-based spam filter using text analysis
ii  spamc          2.63-0.backpor Client for perl-based spam filtering daemon
ii  exim4-base     4.30-4.amwoody EXperimental Internal Mailer -- a Mail Trans
ii  exim4-config   4.30-4.amwoody Debian configuration for exim4
ii  exim4-daemon-h 4.30-4.amwoody Exim (v4) with extended features, including


("EXperimental" seems like wrong name.)

This system is handling email for approximately 2675 customers. It also
runs vm-pop3d and openwebmail. It was running on older hardware on older
Red Hat and older kernel last week. The upgrade to faster hardware and
newer software has caused these issues:

Feb 7 22:34:12 mail kernel: VFS: file-max limit 4096 reached

So I fixed by increasing the /proc/sys/fs/file-max and
/proc/sys/fs/inode-max limits. I have not got that error since fixed.

But I am also getting errors like:

2004-02-11 12:11:45 1Aqxto-0007VN-UU daemon: delivery process fork failed:
Resource temporarily unavailable
2004-02-11 12:11:51 daemon: accept process fork failed: Resource
temporarily unavailable

I have had hundreds of these messages.

And inetd and spamd are having similar issues:

Feb 8 02:46:41 mail inetd[312]: fork: Resource temporarily unavailable

Feb 9 13:11:49 mail spamd[178]: cannot fork: Resource temporarily unavailable

The exim children are running as user Debian-exim and group Debian-exim.
spamd children are running as nobody (seems like Debian should have its
own "spamd" user).

For now, I have added "ulimit -u unlimited" in my
/etc/init.d/{exim4,spamassassin,inetd} scripts before starting (or
restarting) the daemons (which use Debian's start-stop-daemon command).

I will watch this to see if this fixes it.

The limit when I logged in as root was 256; I don't know what it is when
the system starts and runs the init.d scripts. I probabky shouldn't use
"unlimited" but should choose something safer like 500 or 1000. What do
you all use?

I am not sure if this will fix it, if exim or spamd starts processes are
ever started by another child, because when switching users I don't think
it will keep those limits.

Is there any /proc or sysctl method for bumping up the allowed number of
processes for that exim user?

I've read about /etc/security/limits.conf, but as far as I know that only
applies to PAM login methods using that.

Is the only way to fix this to increase NR_TASKS in my kernel source's
include/linux/tasks.h and rebuild the kernel?

Do newer kernels offer a way to do this with a sysctl or /proc change?

Is there a sysctl or a /proc setting to show what the limits are currently
being used by a certain process (or maybe certain user)?

(By the way, NetBSD can change this with the proc.PID.rlimit.maxproc.soft
and proc.PID.rlimit.maxproc.hard systcls.)

Also the exim is configured with:
smtp_accept_max = 100

Jeremy C. Reed
http://bsd.reedmedia.net/ -- BSD news and resources