httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Malo>
Subject Re: [users@httpd] Restricting cgi processor usage
Date Wed, 16 Apr 2003 13:36:58 GMT
* Richard Shaw wrote:

> Thanks, i've put that in place, but was wondering how to confirm that its working..

You may write a simple test cgi script, like


$SIG{XCPU} = sub {
    print "Content-type: text/plain\n\n";
    print "received XCPU, exiting.\n";
    exit 0;

# start infinite loop
1 while 1;


(be aware to kill the script if the limit doesn't work :)

RlimitCPU 1
the script should print after one (cpu-)second "received XPU ..." to the 

> Is there any way you know of to get Apache to report it's rlimits ?

Apache inherits the system settings. Specific settings may be grabbed from 
the server-info handler. (mod_info)

sub the($){+shift} sub answer (){ord q
        [* It is always 42! *]       }
           print the answer
# André Malo # #

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message