Q Emby server PID file

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
neno20st
Posts: 11
Joined: Sun Jan 27, 2019 3:23 pm

Q Emby server PID file

Post by neno20st »

Where I can found emby-server.pid file? Usual path /var/run/emby-server.pid is wrong. There is no file. I need path for configure Monit.

tnx
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: Q Emby server PID file

Post by johnvick »

I'm not an authority on this but does Emby need Monit to restart? I think systemd does this.

/etc/systemd/system/multi-user.target.wants

[Unit]
Description=Emby Server is a personal media server with apps on just about every device.
After=network.target

[Service]
EnvironmentFile=/etc/emby-server.conf
WorkingDirectory=/opt/emby-server
ExecStart=/opt/emby-server/bin/emby-server
RestartForceExitStatus=3
User=emby

[Install]
WantedBy=multi-user.target
User avatar
MichaIng
Site Admin
Posts: 2295
Joined: Sat Nov 18, 2017 6:21 pm

Re: Q Emby server PID file

Post by MichaIng »

Yeah I think no PID file is created, since PIDFile= is as well not defined within the systemd unit.
neno20st
Posts: 11
Joined: Sun Jan 27, 2019 3:23 pm

Re: Q Emby server PID file

Post by neno20st »

tnx on reply. I did it using monit "match process name" instead PID file. Everything work great and all process (radarr, sonarr, nzbget, plex, emby) start after 10 seconds when Monit detect break.
User avatar
MichaIng
Site Admin
Posts: 2295
Joined: Sat Nov 18, 2017 6:21 pm

Re: Q Emby server PID file

Post by MichaIng »

Ah now I understand what Monit does.

Hmm is this a too good idea? I mean if really a service breaks, then usually there is a reason for this that should be fixed before restarting. E.g. in case of full memory (emergency process kills) I would want to recognize this (web application down) instead of having the processes restarted again and again until next full memory. And there are cases where some kind of corruption or misconfiguration prevents the service start, then Monit would attempt to restart it forever until you fix.

Sorry for sharing my scepticism here, but I would like to know if/in which scenarios this being indeed helpful :?.
neno20st
Posts: 11
Joined: Sun Jan 27, 2019 3:23 pm

Re: Q Emby server PID file

Post by neno20st »

This only happened in Emby application. I dont know why. Probably how you say full memory. I only see one day that I cant access it via browser. All other services run well and there is no break. Emby server in this five days break only one time. For me its easiest, when that happen, use Monit start it because im not expert to found reason why break happen.
User avatar
MichaIng
Site Admin
Posts: 2295
Joined: Sat Nov 18, 2017 6:21 pm

Re: Q Emby server PID file

Post by MichaIng »

Perhaps we can debug this together:

A start is to check the service output and dmesg for any kernel/hardware errors:
journalctl -u emby-server or journalctl -t emby-server
and dmesg | tail
Post Reply