Jump to content

EMBY server crashing whenever I perform local database reset in emby for kodi addon (log attached)


Recommended Posts

Posted (edited)

Whenever I try to perform a local database reset + initial sync in my kodi machines (Nvidia SHIELD, using Emby for Kodi addon), my CPU usage status on synology jumps to 99% and after a couple of minutes the EMBY server package crashes/stops running on my synology.

If I order it to start again, it does, but crashes again after 2 minutes or less as long as its running the initial sync KODI side.

 

"Gathering movies" runs ok emby for kodi side, but as soon as that finishes and it actually starts to pull movies 1 by 1, my CPU usage on the Synology jumps to 99% and the emby server stops/crashes.

 

I am on latest versions everywhere (server and client). Don't have ANY idea of what is going on :(

 

I sucessfully made a local database reset/initial sync on one KODI machine. NVIDIA shield one is making all of this happen...

 

Here is the logs from synology EMBY:

 

NBusQ4I.jpg

 

Log file from EMBY server itself + Diagnostics script (this one was done while Emby server was stopped):

Log.txt

rundiags_20171027T003016UTC.log

Edited by djhifi
Posted (edited)

EDIT:double_post

Edited by djhifi
Posted

There is no obvious source of crash. I wonder if it is just getting hammered with requests from the syncing process and that is causing some kind of out of memory error. 

 

While we are here, have you checked out EmbyCon? It's a new add-on that allows you view your Emby library in Kodi and does not require any syncing process. Just browse and play. You can learn more here:

 

https://emby.media/emby-for-kodi.html

 

Thanks.

Posted (edited)

There is no obvious source of crash. I wonder if it is just getting hammered with requests from the syncing process and that is causing some kind of out of memory error. 

 

While we are here, have you checked out EmbyCon? It's a new add-on that allows you view your Emby library in Kodi and does not require any syncing process. Just browse and play. You can learn more here:

 

https://emby.media/emby-for-kodi.html

 

Thanks.

 

Thing is, I succefully synced database from one kodi machine without crashing. Its only happening on the 2nd sync attempt on a different machine :S

I really need this to work as its my main machine (living room). Maybe i create a thread in the synology section? This never happened before and I always had a big collection....so the hammering is out of question or is there any setting I can modify the number of requests the emby for kodi addon does? Currently, regarding artwork its on 25 (as always).

 

Regarding that addon i am aware but unfortunately it does not allow full skin integration with my kodi machine

 

Here is another log, please consult it:

Log2.txt

Edited by djhifi
Posted (edited)

EDIT: double posted

Log2.txt

Edited by djhifi
Posted

@@djhifi, one topic is sufficient. Your issue will be seen. Thanks :)

Posted (edited)

Sorry I just though asking you to merge indeed.

 

Maybe @@solabc16 can lend an extra hand?

 

I will try and run diagnostics to post the results. This is really something which never happened before. So the excess of information request was always present as I always had a big collection...Something is making emby server use 80% of my CPU on "Initial syncs" from the addon.

 

My synology is pretty decent: 1813+....

 

I keep getting these thrown into the log:

 

[2017-10-27 00:17:38 UTC] >> PID file [/var/packages/EmbyServer/target/var/embysvr.pid] does not exist.
[2017-10-27 00:17:38 UTC] >> Emby Server is not running.
[2017-10-27 00:17:38 UTC] >> Exit status is [3].
[2017-10-27 00:17:38 UTC] Script called with action [log]...
[2017-10-27 00:17:38 UTC] >> Returning log file location [/var/packages/EmbyServer/target/var/logs/start-stop-status_20171027.log].

 

 

How can I downgrade my current EMBY for SYNOLOGY version? Just to rule that out...

 

 

EDIT:

 

@@Luke Does "library.db" hold the IP address (per entry AKA movie/tv show) of the hosted server? I mean I cannot seem to open that .db file with notepad ++ and last week I changed my synology ip from 192.168.1.200 to 192.168.2.200 and changed everything accordingly. The thing is, maybe library items prior to that change still hold the old ip address hence slowing down the sync process requested by the emby for kodi addon, which is making the server peg my CPU usage to 99% and then crash?

 

Or is this issue (i.e. the IP replacement) automatically done on each emby server library update?

 

EDIT2: i get these results on the emby for kodi log:

 

03:21:28.521 T:139212055632  NOTICE: EMBY.objects.movies -> ADD movie itemid: eba6de2dea773f3f8816451ecd2167f1 - Title: ...And God Created Woman
03:21:28.604 T:139212055632  NOTICE: EMBY.objects.movies -> ADD movie itemid: f6dff9677db6aa846303543b8622409a - Title: ...And Justice for All
03:21:28.661 T:139212055632  NOTICE: EMBY.objects.movies -> ADD movie itemid: 13cf635b4ae4e5927ec939fa134b2c0b - Title: +1
03:21:28.709 T:139212055632  NOTICE: EMBY.objects.movies -> ADD movie itemid: 37a5f556766add4d2bb2cc07d0469724 - Title: .45
03:21:28.775 T:139212055632  NOTICE: EMBY.objects.movies -> ADD movie itemid: 4ef791c862ddb8a812c144deea60d638 - Title: #Stuck
03:21:28.807 T:139212055632  NOTICE: EMBY.objects.movies -> ADD movie itemid: 801bf98230f72a21e70f1fa4256cdb40 - Title: $50K and a Call Girl: A Love Story
03:21:28.845 T:139212055632  NOTICE: EMBY.objects.movies -> ADD movie itemid: f7b8d84251ef968d0f87645faacc459b - Title: (500) Days of Summer
03:21:28.897 T:139212055632  NOTICE: EMBY.objects.movies -> ADD movie itemid: c260d52947237241de974dc4a654f629 - Title: 2 Days in Paris
03:21:28.945 T:139212055632  NOTICE: EMBY.objects.movies -> ADD movie itemid: cffa68ea118cabccb304f6fe24a2bf64 - Title: 2 Days in the Valley
03:21:28.983 T:139212055632  NOTICE: EMBY.objects.movies -> ADD movie itemid: fd38a6ba293fcb95a9f444fec4eab8bc - Title: 2 Guns
03:21:29.037 T:139212055632  NOTICE: EMBY.objects.movies -> ADD movie itemid: 4838a1d70453f889d10c3ec5cb945b4a - Title: 2:22
03:21:29.078 T:139212055632  NOTICE: EMBY.objects.movies -> ADD movie itemid: b0e57c46b79a02a945bc3c4f3f248045 - Title: 2:37
03:21:29.111 T:139212055632  NOTICE: EMBY.objects.movies -> ADD movie itemid: a762ec8ebc8e9bdb628e49057175bba1 - Title: 3 Days of Normal
03:21:29.137 T:139212055632  NOTICE: EMBY.artwork -> Waiting for empty queue spot: 25
03:21:31.363 T:139212055632  NOTICE: Previous line repeats 21 times.
03:21:31.363 T:139212055632  NOTICE: EMBY.objects.movies -> ADD movie itemid: ac85ab850426d80c3a865335d434c934 - Title: 3 Days to Kill
03:21:31.394 T:139212055632  NOTICE: EMBY.artwork -> Waiting for empty queue spot: 25
03:21:31.609 T:139212055632  NOTICE: Previous line repeats 1 times.
03:21:31.610 T:139212055632  NOTICE: EMBY.objects.movies -> ADD movie itemid: 90aef71b5b4b23feac0a9c78f0f13472 - Title: 3 Idiots
03:21:31.646 T:139212055632  NOTICE: EMBY.artwork -> Waiting for empty queue spot: 25
03:21:32.474 T:139212055632  NOTICE: Previous line repeats 7 times.
03:21:32.474 T:139212055632  NOTICE: EMBY.objects.movies -> ADD movie itemid: 027673ccacd5c62d49796d53b6432d78 - Title: 3 Women
03:21:32.496 T:139212055632  NOTICE: EMBY.artwork -> Waiting for empty queue spot: 25
03:21:33.326 T:139212055632  NOTICE: Previous line repeats 7 times.
03:21:33.326 T:139212055632  NOTICE: EMBY.objects.movies -> ADD movie itemid: cda7c5621249bf02f0d6aefbb9444d9c - Title: 3:10 to Yuma
03:21:33.382 T:139212055632  NOTICE: EMBY.artwork -> Waiting for empty queue spot: 25
03:21:33.763 T:139970139216  NOTICE: Previous line repeats 3 times.
03:21:33.763 T:139970139216   ERROR: CCurlFile::Exists - Failed: Timeout was reached(28) for http://192.168.2.200:8096/emby/Items/37a5f556766add4d2bb2cc07d0469724/Images/Primary/0?MaxWidth=10000&MaxHeight=10000&Format=original&Tag=ea2c99b9d8b16786a8060f74246582f3
03:21:33.794 T:139212055632  NOTICE: EMBY.artwork -> Waiting for empty queue spot: 25
03:21:33.905 T:139212055632  NOTICE: EMBY.objects.movies -> ADD movie itemid: 2a04877a366e8f17c2f524913af50c2e - Title: 3-Iron
03:21:33.919 T:139212055632  NOTICE: EMBY.artwork -> Waiting for empty queue spot: 25
03:21:34.139 T:140016129104  NOTICE: Previous line repeats 2 times.
03:21:34.139 T:140016129104   ERROR: CCurlFile::Exists - Failed: Timeout was reached(28) for http://192.168.2.200:8096/emby/Items/a762ec8ebc8e9bdb628e49057175bba1/Images/Primary/0?MaxWidth=10000&MaxHeight=10000&Format=original&Tag=c64a7a16f178150a562cd3bef6870eba

(...)

 

and then server stops:

 

03:22:00.163 T:139992097872   ERROR: CCurlFile::Exists - Failed: Failure when receiving data from the peer(56) for http://192.168.2.200:8096/emby/Items/71a922709051eea1d16ac224f9941614/Images/Backdrop/0?MaxWidth=10000&MaxHeight=10000&Format=original&Tag=0c86307f31e56cb88487dd8d9e58aac8
03:22:00.164 T:140018201680   ERROR: CCurlFile::Exists - Failed: Server returned nothing (no headers, no data)(52) for http://192.168.2.200:8096/emby/Items/3e3ff6b05b187c56106564bf258f1296/Images/Primary/0?MaxWidth=10000&MaxHeight=10000&Format=original&Tag=2fa9b8bd9fcdf860bc9385715ce6a90c
03:22:00.165 T:139982771280   ERROR: CCurlFile::Exists - Failed: Server returned nothing (no headers, no data)(52) for http://192.168.2.200:8096/emby/Items/ad2af62fbc5538c6241fc5f347afa69d/Images/Primary/0?MaxWidth=10000&MaxHeight=10000&Format=original&Tag=0923956d588c61b26ed3f4d4d9f999f3
03:22:00.165 T:139988989008   ERROR: CCurlFile::Exists - Failed: Server returned nothing (no headers, no data)(52) for http://192.168.2.200:8096/emby/Items/4cc925ab26ef934bf54e4376bdb90f8b/Images/Primary/0?MaxWidth=10000&MaxHeight=10000&Format=original&Tag=0d67d4bd8b3d822c122e7ad5da17b41f
03:22:00.166 T:140002657360   ERROR: CCurlFile::Exists - Failed: Server returned nothing (no headers, no data)(52) for http://192.168.2.200:8096/emby/Items/991e8b17dd11d1e04d57f6ac47887978/Images/Backdrop/0?MaxWidth=10000&MaxHeight=10000&Format=original&Tag=e0aad6d9a57a6277ca0186534a23e4a3
03:22:00.166 T:140005766224   ERROR: CCurlFile::Exists - Failed: Failure when receiving data from the peer(56) for http://192.168.2.200:8096/emby/Items/8669e0f6b25fc2a5c63acd7f7238ce80/Images/Primary/0?MaxWidth=10000&MaxHeight=10000&Format=original&Tag=e2bc38ef2c5250327c3745c8cf0bb3f0
03:22:00.167 T:140003693648   ERROR: CCurlFile::Exists - Failed: Server returned nothing (no headers, no data)(52) for http://192.168.2.200:8096/emby/Items/3e3ff6b05b187c56106564bf258f1296/Images/Backdrop/0?MaxWidth=10000&MaxHeight=10000&Format=original&Tag=2b8af2656bfdfecbca411db803962aed
03:22:00.169 T:139986916432   ERROR: CCurlFile::Exists - Failed: Server returned nothing (no headers, no data)(52) for http://192.168.2.200:8096/emby/Items/ad2af62fbc5538c6241fc5f347afa69d/Images/Backdrop/0?MaxWidth=10000&MaxHeight=10000&Format=original&Tag=27794a9ee7d0314c4e3ea973d4c8bf2b
03:22:00.169 T:140011983952   ERROR: CCurlFile::FillBuffer - Failed: Couldn't connect to server(7)

 

 

EDIT3: Attached Diagnostics script (this one was done while Emby server was stopped):

 

 

 

 

​EDIT4: If I copy the kodi database AKA myvideos107.db + emby.db + all the thumbnails from another machine (same kodi version) the initial sync still prompts on the nvidia shield but this time it does its job till the end and the server doesnt crash (altough I think its not even pulling anything from it?)

 

​Wierd wierd stuff going on...

rundiags_20171027T003016UTC.log

Edited by djhifi
Posted

The server is crashing, not the add-on. 

 

Try removing the kodi sync plugin.

Angelblue05
Posted (edited)

The timeout is related to getting artwork from your server. That's internal to Kodi but the addon forces it. You can disable that behavior in the addon settings > sync option > disable force artwork cache Or decrease the number of threads for artwork (which is right below the option)

 

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
Posted

The timeout is related to getting artwork from your server. That's internal to Kodi but the addon forces it. You can disable that behavior in the addon settings > sync option > disable force artwork cache Or decrease the number of threads for artwork (which is right below the option)

 

 

Sent from my iPhone using Tapatalk

 

What is the default number of threads?

Angelblue05
Posted

Default is 25. But the timeout is not something a lot of users experience.

 

 

Sent from my iPhone using Tapatalk

Posted (edited)

The server is crashing, not the add-on. 

 

Try removing the kodi sync plugin.

 

@@Luke The thing is, EMBY server only crashes/stops when the emby for kodi addon performs local database reset + initial sync. The addon gathers the movies fine but when it starts showing them 1 by one (I guess when the requests start?) 2 minutes later the EMBY app on my synology hits 99% CPU usage, crashes and stops (attention: my synology is NOT crashing) just the EMBY server package that is stopping (and, when it does, CPU usage returns to normal).

 

All other EMBY server usage (from database scan, to peoples refresh, etc etc) performs OK. Not even 20% of the CPU is used. So...this is addon related in my opinion, or some specific issue to the latest server packaged for SYNOLOGIES. I mean...this never happened. And I provided all the logs I could and it doesn't help...it's frustrating.

 

@@Angelblue05 I will try and reproduce those settings altough I've already tampered a little yesterday to no avail. In the meantime I have copy+pasted the .db on one of the kodi machine to all others and the initial sync does not make the emby server crash (because everything is already in place of course). But I will try removing the "force artwork cache" (specially, because all other options, when reduced, produced the same result: crash).

 

Ive tried 1 download thread, 2 download threads...

Maximum items per thread to 20, 15...

 

Limit artwork cache threads to 5...10...

 

Nothing worked. I just need to uncheck force artwork caching and test. Anyway I want artwork cached so lets see if it runs well if I uncheck on the initial sync and if when I manually ask to cache the artwork via the built-in option it crashes the server or not...

 

This is so strange. I use this system for 1 year now. AND IT NEVER HAPPENED...

 

@@solabc16 can this be related to the server Version 3.2.34.0 having a bug?

Edited by djhifi
Posted

The server is crashing, not the add-on. 

 

Try removing the kodi sync plugin.

 

Cant I just disable it on the addon + server?

Angelblue05
Posted (edited)

Why not confirm force cache artwork first? I don't see how the fast sync would be causing this issue. It only runs when the websocket receive events. When the initial sync is running in Kodi, technically nothing is triggering the websocket and therefore the fast sync remains idle, so it makes no sense for that to be the issue.

 

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
nvader2000
Posted

Same error hereon a Synology. I do not have any plugins or add-ons.

 

"PID file [/var/packages/EmbyServer/target/var/embysvr.pid] does not exist"

 

This just started happening yesterday for no apparent reason. Been running 3.2.34.0 since it was first released.

Posted

Hello All

 

For those of you having problems, can you run the send logs utility please, this will give me more information.

 

Details here: https://github.com/MediaBrowser/Wiki/wiki/Synology-:-How-to-Send-us-Support-Logs

 

Just post the reference you get at the end, once the utility has run.

 

@@nvader2000, are you running the Kodi plugin as well? What is happening at the time the server stops?

 

This "PID file [/var/packages/EmbyServer/target/var/embysvr.pid] does not exist" in itself is not an error, it just means the server isn't running - we'll need to look elsewhere for the root cause.

 

Best

- James

nvader2000
Posted

I was reviewing logs due to Emby not running. I could start Emby but as soon and I try to browse my media it would stop. I have since backed up my Emby srever, uninstalled and install version 3.2.35.0. But now I cannot restore. I did use the Emby Backup Plugin which was successful, but now when I go to restore nothing happens. Nothing is restored. Thought that a restart was needed and that did not work either.

 

I am a bit frustrated that a simply procedure is not working. Is there a way to manually restore? Can I simply copy the contents of the backup folder to where Emby is installed? If so, where do I copy to?

nvader2000
Posted

Ok so there was an update to the Emby Backup plugin that may have resolved my issue. Release notes indicate a compatibility fix. Possibly with 3.2.35.0. Thus far every looks good after the restore.

Posted

That will have no effect on this.

  • 2 weeks later...
Posted

Why not confirm force cache artwork first? I don't see how the fast sync would be causing this issue. It only runs when the websocket receive events. When the initial sync is running in Kodi, technically nothing is triggering the websocket and therefore the fast sync remains idle, so it makes no sense for that to be the issue.

 

 

Sent from my iPhone using Tapatalk

 

Was this answer for me? I already told that force artwork cache ON was (havent tested on the newest version) crashing the emby package

Posted (edited)

Hello All

 

For those of you having problems, can you run the send logs utility please, this will give me more information.

 

Details here: https://github.com/MediaBrowser/Wiki/wiki/Synology-:-How-to-Send-us-Support-Logs

 

Just post the reference you get at the end, once the utility has run.

 

@@nvader2000, are you running the Kodi plugin as well? What is happening at the time the server stops?

 

This "PID file [/var/packages/EmbyServer/target/var/embysvr.pid] does not exist" in itself is not an error, it just means the server isn't running - we'll need to look elsewhere for the root cause.

 

Best

- James

 

I already ran that utility, scroll up.

Since the latest version I have not tested it again.

I will (backup, of course, or I will lose it forever lol) reset my database and rebuild via EMBY for KODI plugin WITH artwork caching ON, and see if it crashes the synology package or not.

Edited by djhifi
Posted

Hello @@djhifi

 

I suspect the issue will be resolved with the latest release, let us know how you get on.

 

I did take a look through the thread, but didn't see the reference number from the send logs utility - apologies if I missed it.

 

Best

- James

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...