Mailing List Archive

#1824: Varnish.service should be using type=notify
#1824: Varnish.service should be using type=notify
---------------------+----------------------
Reporter: zmyrgel | Type: defect
Status: new | Priority: normal
Milestone: | Component: varnishd
Version: 4.0.3 | Severity: normal
Keywords: systemd |
---------------------+----------------------
I'm running several Varnishd / varnishncsa instances on our RHEL 7
servers.
There seems to be incorrect assumptions in the varnish.service systemd
file about starting of varnishd.
The service file uses Type=forking.
As far as I've understood, this makes Varnishd fork and that will signal
that the Varnishd is ready and running.
Problem appears to be with VSM files. The VSM files are not necessarily
ready when Varnishd reports itself ready. This makes following Varnishncsa
processes fail with messsages:
Can't open VSM file (Abandoned VSM file (Varnish not running?)
/var/lib/varnish/example/_.vsm"

What I've gathered the from looking at systemd is that Varnishd process
should use systemd's
[http://www.freedesktop.org/software/systemd/man/sd_notify.html
sd_notify(3)] to signal when the VSM is ready.

I'm making assumption here that running multiple varnish instances on same
computer makes the creation of VSM files slower which causes the issue to
pop up.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1824>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1824: Varnish.service should be using type=notify [ In reply to ]
#1824: Varnish.service should be using type=notify
----------------------+--------------------
Reporter: zmyrgel | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: 4.0.3
Severity: normal | Resolution:
Keywords: systemd |
----------------------+--------------------

Comment (by lkarsten):

If you are running multiple instances, you are using your own init script?

I looked at this last week, and my conclusion then was that it is far
cheaper to add `-t 60` or even `-t off` to varnishncsa (and varnishlog)
startup command line instead.

Currently -t is available in Varnish 4.1 and git master.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1824#comment:1>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1824: Varnish.service should be using type=notify [ In reply to ]
#1824: Varnish.service should be using type=notify
----------------------+--------------------
Reporter: zmyrgel | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: 4.0.3
Severity: normal | Resolution:
Keywords: systemd |
----------------------+--------------------

Comment (by lkarsten):

Related: -t option introduced after #1674 discussion.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1824#comment:2>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1824: Varnish.service should be using type=notify [ In reply to ]
#1824: Varnish.service should be using type=notify
----------------------+--------------------
Reporter: zmyrgel | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: 4.0.3
Severity: normal | Resolution:
Keywords: systemd |
----------------------+--------------------

Comment (by agaltier):

Hi,[[BR]]
You can add in your /etc/systemd/system/varnishncsa.service[[BR]]
{{{
[Service]
[...]
Restart=on-failure
RestartSec=5s
[...]
}}}

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1824#comment:3>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1824: Varnish.service should be using type=notify [ In reply to ]
#1824: Varnish.service should be using type=notify
----------------------+---------------------
Reporter: zmyrgel | Owner:
Type: defect | Status: closed
Priority: normal | Milestone:
Component: varnishd | Version: 4.0.3
Severity: normal | Resolution: fixed
Keywords: systemd |
----------------------+---------------------
Changes (by lkarsten):

* status: new => closed
* resolution: => fixed


Comment:

Hi.

Yes, that would be a brute-force workaround for this issue. Adding "-t
off" is, as explained, another option.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1824#comment:4>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs