We’ve recently migrated our main login and web server from a Solaris/SPARC computer to a Linux/AMD64 box. The computer is running openSUSE 11.0 with the most recent patches applied.
Because this is a login server with a lot of student programming projects running, a per-user process limit is a necessity. I have found, though, that when a lot of requests are made to our apache server, specifically requests to cgi scripts, the parent apache process will exit when there are as many children running as “nproc” in /etc/security/limits.conf or “SOFTPROCESSLIMIT” in /etc/sysconfig/ulimit is reached.
The errors I get in /var/log/apache2/error_log are as follows:
[Tue Sep 16 01:34:59 2008] [alert] (11)Resource temporarily unavailable: setuid:
unable to change to uid: 29
[Tue Sep 16 01:34:59 2008] [alert] (11)Resource temporarily unavailable: setuid:
unable to change to uid: 29
[Tue Sep 16 01:34:59 2008] [alert] (11)Resource temporarily unavailable: setuid:
unable to change to uid: 29
[Tue Sep 16 01:34:59 2008] [alert] Child 21856 returned a Fatal error… Apache
is exiting!
When this happens, I find exactly nproc (or SOFTPROCESSLIMIT) httpd2-prefork processes running. It is necessary to kill these with a “KILL” signal before apache can be restarted.
This seems like an ungraceful way to handle hitting a system limit.
Has anyone else experienced this problem and, if so, did you find a solution. Currently, I’ve set VERY high limits for the group that apache is in and set lower limits for groups that most of our users belong to. This is only a workaround, though and not a solution.
TIA