[BlueOnyx:21524] Re: systemd php-fpm-7.0.service dies, won't restart

Michael Stauber mstauber at blueonyx.it
Tue Nov 14 09:44:48 -05 2017


Hi Chris,

> So... what's hammering it with restart requests?  ActiveMonitor?
> Something else?  Whatever it was, it wasn't a human.

It was the GUI handlers and in particular a submodule called
Sauce::Service which handles service restarts.

> If I read correctly, maybe the restarts were caused by some other
> process on the BlueOnyx server.  ie: reconfiguration of service or
> something else that caused the restarts, perhaps by bumping around in
> the GUI.

Whenever there is an event that changes a service configuration, we need
a restart of that service to put the change into effect. So typically a
handler that modifies the Apache config either runs an Apache restart
itself, or the event that fired this handler also fires a separate
handler that does Apache restarts.

Due to the modularity of BlueOnyx it can be that a simple change where
you hit save in the GUI triggers more than one handler to edit a certain
config file. One edits this aspect, another that, yet another runs a
search and replace for yet another value over the config file. And there
is a good chance that each of them eventually wants Apache restarted in
one way or another.

So you might get multiple restart requests for Apache when you save some
changes in the GUI that affect the Apache configuration. Usually that's
no big deal even with Systemd in place. Sauce::Service even filters and
combines some of these redundant calls to reduce the amount of restart
requests that Systemd sees.

However: During CMU-Import it can become a big deal, because every Vsite
import triggers 11-12 Apache restarts in short order. Import enough
Vsites and Systemd will get annoyed about being bothered so often.

The fix for that was rather complicated. I combined everything that
needs to edit the Apache configuration into a single Handler. Next I
reworked what triggered the HTTPd restart and made sure that the event
that causes it happens only at the end of the transaction chain. This
also will reduce the Apache restarts during CMU-Imports drastically. I
think I actually might have to modify CMU or a CMU-Import might not even
restart Apache once on its own.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list