[squid-users] squid.service with Type=Notify is not always reliable (Arch Linux)

Amish anon.amish at gmail.com
Tue Sep 1 06:32:05 UTC 2020


Hello,

I have frequently observed an issue with squid.service but I am not able 
to detect the real cause. As mostly it works but sometimes does not.

I am using Arch Linux with squid 4.13 (but I had noticed same issue in 
4.10 as well)

Most likely I am noticing this issue ever since service Type was changed 
from forking to notify in squid.service

Commit: 
https://github.com/squid-cache/squid/commit/6fa8c66435d55a2e713db0222cdca3a9dccf5bbe

What happens is squid starts correctly, but systemd does not seem to be 
getting the notification from squid that it has started.

Sep 01 06:40:04 foo systemd[1]: Starting Squid Web Proxy Server...
Sep 01 06:41:34 foo systemd[1]: squid.service: start operation timed 
out. Terminating.
Sep 01 06:42:06 foo systemd[1]: squid.service: Failed with result 'timeout'.
Sep 01 06:42:06 foo systemd[1]: Failed to start Squid Web Proxy Server.

Then it kills squid process.

Squid cache.log shows no error w.r.t. notify and seems to start correctly.

What surprises me is that it works most of the times. Just randomly the 
above timeout error occurs.

If in service override file, I change type to forking and remove 
--foreground. It starts working again.

Like this: (comment lines are original lines when the issue occurs)

[Service]
#Type=notify
Type=forking
ExecStart=
#ExecStart=/usr/bin/squid -f /etc/squid/custom.conf --foreground -sYC
ExecStart=/usr/bin/squid -f /etc/squid/custom.conf -sYC

Any idea what could be issue? Is there any squid.conf setting which I 
may using and stopping notify randomly?

Any help would be highly appreciated.

Thanks and regards,

Amish



More information about the squid-users mailing list