Controlling External Processes


RlimitCPU RLimitMem RLimitNProc


Apache provides several directives to control the amount of resources that external processes use. This applies to CGI scripts spawned from the server and programs executed via Server Side Includes. Support for the following directives is available only on Unix and varies from system to system:

  • RLimitCPU: Accepts two parametersthe soft limit and the hard limit for the amount of CPU time in seconds that a process is allowed. If the max keyword is used, it indicates the maximum setting allowed by the operating system. The hard limit is optional. The soft limit can be changed between restarts, and the hard limit specifies the maximum allowed value for that setting. If you are confused, check Chapter 11 for a similar discussion with ServerLimit and MaxClients.

  • RLimitMem: The syntax is identical to RLimitCPU but this directive specifies the amount (in bytes) of memory used per process.

  • RLimitNProc: The syntax is identical to RLimitCPU but this directive specifies the number of processes.

These three directives are useful to prevent malicious or poorly written programs from running out of control.




Apache(c) Phrase Book(c) Essential Code and Commands
Apache Phrasebook
ISBN: 0672328364
EAN: 2147483647
Year: 2006
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net