nbari
February 24th, 2009, 08:41
I have just installed FreeBSD 7.1 amd64, created a jail and inside the jail executed the following code:
#include <stdio.h> int main() { while(1) fork(); }
gcc -o fork forc.c
$./fork
after few seconds the server stop responding and the load average increased a lot:
977.85 527.55 311.05
on the console i got lot of this:
maxproc limit exceeded by uid 1001, please see tuning(7) and login.conf(5).
maxproc limit exceeded by uid 1001, please see tuning(7) and login.conf(5).
maxproc limit exceeded by uid 1001, please see tuning(7) and login.conf(5).
maxproc limit exceeded by uid 1001, please see tuning(7) and login.conf(5).
Any good hints/tips on how to avoid this on a production server ? I pretend to give ssh to many users and would like to avoid this kind of problems.
thanks in advance
#include <stdio.h> int main() { while(1) fork(); }
gcc -o fork forc.c
$./fork
after few seconds the server stop responding and the load average increased a lot:
977.85 527.55 311.05
on the console i got lot of this:
maxproc limit exceeded by uid 1001, please see tuning(7) and login.conf(5).
maxproc limit exceeded by uid 1001, please see tuning(7) and login.conf(5).
maxproc limit exceeded by uid 1001, please see tuning(7) and login.conf(5).
maxproc limit exceeded by uid 1001, please see tuning(7) and login.conf(5).
Any good hints/tips on how to avoid this on a production server ? I pretend to give ssh to many users and would like to avoid this kind of problems.
thanks in advance