Based on http://httpd.apache.org/docs/2.0/mod/core.html#rlimitcpu I set a 2
second soft and hard limit on the default website
/etc/apache2/sites-enabled/000-default:
<VirtualHost *:80>
ServerAdmin webmas...@localhost
RLimitCPU 2 2
...
I put the example script above into /usr/lib/cgi-bin/test.cgi, and ran it. It
was correctly killed, observed via strace:
...
[pid 10848] write(1, "2\n", 2) = 2
[pid 10848] close(1) = 0
[pid 10848] munmap(0x7f4f160ed000, 4096) = 0
[pid 10848] close(2) = 0
[pid 10848] exit_group(0) = ?
Process 10848 detached
<... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 10848
--- SIGCHLD (Child exited) @ 0 (0) ---
+++ killed by SIGKILL +++
Process 5234 detached
** Changed in: apache2 (Ubuntu)
Status: New => Invalid
--
RLimitCPU has no effect in Apache
https://bugs.launchpad.net/bugs/394350
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs