Thus typed Alberto Gonzalez Iniesta:
>$ps axu
>bash: fork: Resource temporally unavailable.
You have exceeded the maximum number of processes.
This may be due to not having enough ram (use dmesg and
vmstat to check), or a kernel limitation.
First, determine if it is the latter: There are per-user process
limits (typically 256) and system wide (typically 512) . You need
to find out which one is being exceeded, and increse it.
# tells you total processes
ps -aux | wc -l
# tells you total processes by user
ps -aux | perl -ne 'BEGIN{<>}($n)=split;$p{$n}++;END{for
$n(keys %p){print"$n:$p{$n}\n"}}'
You may want to cron these to a file and observe what
the values are when the fork problem arises.
Check the limits in this file:
/usr/src/linux/include/linux/tasks.h, the
If you have not exceeded anything, buy more RAM.
If you have exceed the total or per-user limit, modify
the following lines:
#define NR_TASKS 512
#define MAX_TASKS_PER_USER (NR_TASKS/2)
#define MIN_TASKS_LEFT_FOR_ROOT 4
... and rebuild the kernel. If you need to change MAX_TASKS_PER_USER,
I'd suggest get rid of the formula, and replace it with a constant,
perhaps 80% of NR_TASKS.
>Sendmail stops accepting connections and a lot of incoming mails get
>lost.
If your system is bursty, meaning that it is very busy at times,
and then catches up and goes idle, you shouldn't lose any mail.
Most/All MTAs (like sendmail) "store and forward" and will attempt
redelivery for several days. If they can't reach your machine,
they will keep on trying.
Now if your machine never idles and is always busy, and having
fork problems, that is another story.
>I get thousands of files in /var/spool/mqueue and there are always more
>than 30 sendmail processes running.
This should not be a problem.
>I can't trust that system anymore. Should I replace Sendmail with any
>other MTA?
You should figure out and fix the forking problem first. If you
don't, your next MTA may have the same problem.
--
Bill Huston (bhuston@eden.com) Tue Nov 30 16:01:50 1999 (31 days left...!)
http://mu.clarityconnect.net <== things w/eyes and a brain ONLY!
__o Fine's Corollary:
_`\<,_ Functionality breeds Contempt.
(_)/ (_)
References:
|
|