[Spce-user] ngcp-mediator.service failing on reboot

Alex Lutay alutay at sipwise.com
Mon Mar 25 13:54:35 EDT 2019


Hi,

It looks like redis was not reachable in a moment when mediator started.
In the same time mediator.service unit looks OK:
> After=redis-server.service
> Wants=redis-server.service

Unfortunately 'redis-server.service' has Type=simple only,
which cause race condition here as Systemd doesn't know when service is
ready to process incoming connections.
It is better to have Type=notify, like we have for all Sipwise services.
Systemd believed redis-server has been started while in fact it was not.
Check the redis log to see why he is so slow, maybe add more HW
resources here?
I never notice such problem on Sipwise test installations as
it is probably reproducible on specific performance/hardware setup only.

I will report the issue internally to consider possibility of
adding Type=notify for redis-server unit. I am strongly believe
upstream will reject it. It took some time to migrate from
Type=forking to Type=simple there. :-(

Summary:
1) check redis log, why it is so slow on boot
2) add more hardware if possible (CPU/RAM)
3) add some sleep into redis-server unit to wait some time before
reporting unit has been started, it will delay mediator start.

Have fun!

On 3/25/19 6:11 PM, Andy Clark wrote:
> Mar 25 09:59:38 spce (err) mediator[1356]: medredis.c:420
> [medredis_init]: Failed to perform redis query 'PING': LOADING Redis is
> loading the dataset in memory

-- 
Alex Lutay



More information about the Spce-user mailing list