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.


sleep_after_fork microseconds


sleep_after_fork 0


sleep_after_fork 10000

    Appendix A. Config File Reference