restarting dead worker

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

restarting dead worker

senor
Hi All,

I had to change a monitor script to use squidclient ping instead of
'squid -k check' because the check would succeed even if all workers had
died except for the coordinator and disker. Obviously, the real problem
is that the workers are dying but what I'm looking for ATM is a way to
restart individual workers. It seems a complete restart is necessary
once the coordinator gives up after a few attempts. I'd like to trigger
the coordinator to retry or something similar. Anything possible?

Bonus question: Where, if anywhere, is the cache manager use of "kid=N"
documented? I haven't gone to the source code yet and would like not to.

Thanks in advance,
Senor

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: restarting dead worker

Alex Rousskov
On 05/13/2018 03:47 PM, senor wrote:

> I'm looking for ATM is a way to
> restart individual workers. It seems a complete restart is necessary
> once the coordinator gives up after a few attempts. I'd like to trigger
> the coordinator to retry or something similar. Anything possible?

Yes, in Squid v4:
http://www.squid-cache.org/Doc/config/hopeless_kid_revival_delay/


> Bonus question: Where, if anywhere, is the cache manager use of "kid=N"
> documented? I haven't gone to the source code yet and would like not to.

That cache manager parameter is not documented because it is not yet
supported. There is a workers=N parameter documented at

https://github.com/squid-cache/squid/commit/80f629d79e830cd60da2efa2d7c7edd93e3fbaa4

I do not know whether it currently works.

Alex.
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: restarting dead worker

Amos Jeffries
Administrator
In reply to this post by senor
On 14/05/18 09:47, senor wrote:
> Hi All,
>
> I had to change a monitor script to use squidclient ping instead of
> 'squid -k check' because the check would succeed even if all workers had
> died except for the coordinator and disker. Obviously, the real problem
> is that the workers are dying but what I'm looking for ATM is a way to
> restart individual workers. It seems a complete restart is necessary
> once the coordinator gives up after a few attempts. I'd like to trigger
> the coordinator to retry or something similar. Anything possible?

As you said; the coordinator already did retry many times before it gave
up. That is pretty clear evidence that coordinator retrying is not working.


>
> Bonus question: Where, if anywhere, is the cache manager use of "kid=N"
> documented? I haven't gone to the source code yet and would like not to.

Cache manager is a REST web API. So parameters like that are passed as
query-string in the URLs. Support for parameters is report-specific and
most of the reports are undocumented. It is mentioned in the SMP pages
somewhere IIRC, but only as a mention that it exists.

In regards to your problem. The cachemgr reports are executed by
workers, not the coordinator. So that API in its current form is highly
unlikely to help with restarting of a single worker. But if you find a
report that pays attention to that parameter it might be useful to see
if any workers are running.
 Ultimately watching the cache.log for worker death and restart messages
will be your best source of info about the deaths. You should even find
the reason the workers are dying in there.

Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users