Name
sleep_after_fork
Synopsis
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 |
Default | sleep_after_fork 0 |
Example | sleep_after_fork 10000 |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access