Hello!

I have some user session services running (executing Rails background
workers, e.g. sidekiq etc.). On one busy/bigger server, when booting
the machine, these user sessions fail to start up due to timeouts.

Actually, it feels wrong to just bump up the timeouts. I'd rather make
them depend on the mysqld service (which is the slowest to start) and
redis (it makes no sense without it) but that actually fails on me:
Trying to start the user service now says that the service is unknown:


$ systemctl --user cat sidekiq@invitation_tool.service
# /etc/systemd/user/sidekiq@.service
[Unit]
Description=sidekiq for %i
After=redis.service
Requires=redis.service

[Service]
Type=simple
Environment=RAILS_ENV=production
WorkingDirectory=%h/rails-apps/%i/current
ExecStart=/usr/bin/env bin/sidekiq -C config/sidekiq.yml
ExecStop=/bin/kill -TERM $MAINPID
TimeoutStartSec=300s
Restart=on-failure

[Install]
WantedBy=default.target


So it looks like user session deps are completely isolated from the
system dependencies namespace. How do I circumvent this? I'd like to
depend user session services on system services.

Optimally this could be solved by proper socket activation but
apparently most service are still far from supporting it.

-- 
Regards,
Kai

Replies to list-only preferred.

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to