sleep_after_fork

 < Day Day Up > 

sleep_after_fork

Squid uses the fork( ) system call to spawn helper processes, such as redirectors, authenticators, and DNS resolvers . On some systems, a rapid sequence of fork( ) calls consumes all available real and virtual memory. Thus, a fork( ) call may fail with an "out of memory" error. Note that this isn't necessarily a fatal error. Squid continues running as long as at least 50% of helper processes are successfully started.

To alleviate this problem, you can instruct Squid to sleep for a small amount of time after each fork( ) call. This gives the recently forked process time to complete its exec ( ) call and free up the memory.

Don't set this value too high, especially if you have a large number of helper processes. Squid doesn't service any client requests until all helpers have been started.

Syntax

 sleep_after_fork   microseconds   

Default

 sleep_after_fork 0 

Example

 sleep_after_fork 10000 
 < Day Day Up > 


Squid
Squid: The Definitive Guide
ISBN: 0596001622
EAN: 2147483647
Year: 2004
Pages: 401
Authors: Duane Wessels

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