Re: wtmpx file incrases fast because of squid in inittab

From: Alex Rousskov <rousskov@dont-contact.us>
Date: Thu, 23 Sep 1999 10:41:46 -0600 (MDT)

On Thu, 23 Sep 1999, Sherif Diaa El-Din - Email wrote:

> sq:3:respawn:/usr/local/squid/bin/squid.sh < /dev/null >> /tmp/squid.log
> 2>&1
>
> and squid.sh is :
> #!/bin/sh
> ...
> exec bin/squid -CYs
>
> the problem is that I found /var/wtmpx increases so fast that /var gets
> filled, when I checked it I found squid.sh is written in it few times per
> second
>
> so I figured out that squid.sh dies, I didn't find a file
> called /tmp/nosquid, I guess that is why inittab starts it again
> so why isn't /tmp/nosquid is created , and which process should start it?
> and how can I overcome this problem ?

The purpose of your inittab/squid.sh approach is to re-start Squid if
"bin/squid -CYs" terminates. And that is exactly what is going on.

Recent versions of Squid, put squid into a "daemon" mode by default.
Hence "bin/squid -CYs" terminates almost immediately (spawning a Squid
process). You can use -N flag to tell Squid not to go into a daemon
mode. Another approach is to rely on Squid ability to respawn children
and start Squid just once when the machine boots.

The /tmp/nosquid file hack is for you to _manually_ prevent squid.sh
from restarting Squid if needed in an emergency. In other words, if
Squid is restarting like crazy while you are trying to fix some problem
(that causes restarts), then "touch" /tmp/nosquid. The restarts would
stop. Do not forget to delete /tmp/nosquid when you are done fixing the
problem.
 
Alex.
Received on Thu Sep 23 1999 - 10:56:57 MDT

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