Jump to content

Server stopping


Recommended Posts

Posted (edited)

FYI

I updated to 4.6.3.0 Saturday morning.

Today Emby crashed, I ran systemctl status emby-server

Jun 22 07:52:31 example.emby.com systemd[1]: emby-server.service: systemd-oomd killed 4 process(es) in this unit.
Jun 22 07:52:31 example.emby.com systemd[1]: emby-server.service: Main process exited, code=killed, status=9/KILL
Jun 22 07:52:34 example.emby.com systemd[1]: emby-server.service: Failed with result 'signal'.
Jun 22 07:52:34 example.emby.com systemd[1]: emby-server.service: Consumed 3d 2h 49min 20.300s CPU time.

 

restarted and running again

Edited by Thor.2
Posted
6 hours ago, Thor.2 said:

FYI

I updated to 4.6.3.0 Saturday morning.

Today Emby crashed, I ran systemctl status emby-server

Jun 22 07:52:31 example.emby.com systemd[1]: emby-server.service: systemd-oomd killed 4 process(es) in this unit.
Jun 22 07:52:31 example.emby.com systemd[1]: emby-server.service: Main process exited, code=killed, status=9/KILL
Jun 22 07:52:34 example.emby.com systemd[1]: emby-server.service: Failed with result 'signal'.
Jun 22 07:52:34 example.emby.com systemd[1]: emby-server.service: Consumed 3d 2h 49min 20.300s CPU time.

 

restarted and running again

Hi there, please attach the emby server log from when that happened. thanks.

Posted

Maybe database corruption during update?

Last night, Scan Media and Refresh Guide tasks would not run and failed every time tried. 
 

Also marking shows watched was not working.

 

reboot cleared the errors.


I’ll look up for the clean database tool.

thegrunge
Posted (edited)

@Luke From my side sometimes the .service crashes, but does not restart automatically. I would like to modify the .service file so that it restarts in the event of a crash.

[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

 

I wonder if I could add:

Restart=on-failure
RestartSec=5s
Edited by thegrunge
Posted

Have you tried it?

  • 7 months later...
Posted (edited)

I have already modified the .service file a few times, because I had this problem. for some time I haven't had to do it, because we have to modify the service every time there is an update, and the server was stable.

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

[Service]
EnvironmentFile=/etc/emby-server.conf
WorkingDirectory=/opt/emby-server
ExecStart=/opt/emby-server/bin/emby-server
RestartForceExitStatus=3
User=emby
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target

 

I don't know if we can afford to remove: RestartForceExitStatus=3

I also tried: Restart=always  this way every time I stop the service it restarts automatically after 5 seconds.

But It seems to me that I no longer had this problem by modifying the .service in this way. I speak about it today because the problem occurred. I simply did systemctl restart emby-server to restart the .service

 

 

Edited by thegrunge
  • Thanks 1
Posted

I'll give it a try and let you know if the problem comes back.

[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
User=emby
Restart=on-failure
RestartSec=3s

[Install]
WantedBy=multi-user.target

  • Thanks 1
Posted

There was no error with the service I remember that it had simply stopped. So I did like this. This way when the service stops for no reason and without errors it restarts immediately Using Restart=always is ideal in this case when the service closes, whether without or with error, it restarts immediately, even if we turn off the server in the dashbord. with systemctl stop emby-server it stays closed so it's perfect like that.  Usually Restart=on-failure is used

 

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

[Service]
Type=simple
User=emby
Group=emby
EnvironmentFile=/etc/emby-server.conf
WorkingDirectory=/opt/emby-server
ExecStart=/opt/emby-server/bin/emby-server
Restart=always

[Install]
WantedBy=multi-user.target
 

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...