squid 1.1.8: fork()'ing a new ftpget server fails when rotating logs

From: Karsten Spang <krs@dont-contact.us>
Date: Mon, 10 Mar 97 10:48:15 +0100

With squid 1.1.8, I am unable to rotate logs, and keep squid running.
The problem is that it shuts down the ftpget server before rotating, and
attempts to restart it afterwards. But this fails with
ftpInitialize: fork: (12) Not enough core
which of course is no wonder, keeping the memory usage of the running squid
in mind. Squid treats this as a fatal error, and shuts down.

I thought that the reason for having the ftpget and dnsserver processes
running, was exactly to avoid fork()'s with the cache loaded, so I am a
bit confused by this design.

I suspect that there are similar problems with the pinger, but I didn't
actually see them, as the shutdown stopped the program before the code was

I thought that the best solution to this problem would be to implement
"reopen log" commands in the servers, but as far as I can tell, the logs
are not opened by the servers themselves, but by squid before exec(), so
I guess that this is not an option.

Alternatively, the fork() calls can be replaced by vfork() calls, at least
on systems where this works...

For now, I just shut down the cache, and restart it after rotating log files
from the script.

E-mail: krs@kampsax.dk Karsten Spang
Phone: +45 36 39 08 00 Kampsax Technology
Fax: +45 36 77 03 01 P.O. Box 1142
WWW: http://www.kampsax.dk/~krs DK-2650 Hvidovre
Refer to my web page for PGP public key Denmark
Received on Mon Mar 10 1997 - 01:55:04 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:34:39 MST