Jump to content

Emby for Kodi stops syncing


agentxan

Recommended Posts

agentxan

I have several Pi 2's and after a while the stop recieving updates until they are restarted. Looking at the log files I am seeing an error about the database being locked at the time it stops syncing.

Normally I use Kodi 16 but I went ahead and downgraded my openelec to see if I got the error on Kodi 15 which I still do.

 

Kodi 15 log file

Kodi (15.1 Git:f4dda26)

https://www.dropbox.com/s/2ittyoj1g4tu5gq/kodi2.log?dl=0

OpenELEC (official) - Version: 5.95.5 6.0, kernel: Linux ARM 32-bit version 4.1.6

 

Kodi 16 log file

Kodi (16.0-ALPHA4 Git:4173817)

OpenELEC (Milhouse) - Version: devel-20151006001946-#1005z-gdc340f5 [build #1005z] 6.0, kernel: Linux ARM 32-bit version 4.1.8

https://www.dropbox.com/s/byv7cei6wu4b6ss/kodi1.log?dl=0

23:52:45 36411.976562 T:1846514752  NOTICE: EMBY WebSocketThread -> logMsg : sendProgressUpdate
23:52:45 36411.984375 T:1846514752  NOTICE: EMBY WebSocketThread -> logMsg : Message data: {"Data": "{\"ItemId\": \"fcd913c78c0d9e44871afb9dc10b1941\", \"QueueableMediaTypes\": \"Video\", \"SubtitleStreamIndex\": \"\", \"MediaSourceId\": \"fcd913c78c0d9e44871afb9dc10b1941\", \"IsMuted\": false, \"PositionTicks\": 77410001, \"IsPaused\": false, \"CanSeek\": true, \"VolumeLevel\": 94, \"PlayMethod\": \"DirectPlay\", \"AudioStreamIndex\": 1}", "MessageType": "ReportPlaybackProgress"}
23:52:47 36414.335938 T:1658758208   ERROR: Exception in thread Thread-110:
                                            Traceback (most recent call last):
                                              File "/home/stephan/projects/openelec-6.0/build.OpenELEC-RPi2.arm-5.95.5/Python-2.7.3/.install_pkg/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/LibrarySync.py", line 1110, in run
                                                self.setUserdata(listItems)
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/LibrarySync.py", line 932, in setUserdata
                                                cursorvideo.execute("SELECT media_type FROM emby WHERE emby_id = ?", (itemId,))
                                            OperationalError: database is locked
23:52:50 36416.988281 T:1846514752  NOTICE: EMBY Player -> logMsg : reportPlayback Called
Edited by agentxan
Link to comment
Share on other sites

MSattler

 

I have several Pi 2's and after a while the stop recieving updates until they are restarted. Looking at the log files I am seeing an error about the database being locked at the time it stops syncing.

Normally I use Kodi 16 but I went ahead and downgraded my openelec to see if I got the error on Kodi 15 which I still do.

 

Kodi 15 log file

Kodi (15.1 Git:f4dda26)

https://www.dropbox.com/s/2ittyoj1g4tu5gq/kodi2.log?dl=0

OpenELEC (official) - Version: 5.95.5 6.0, kernel: Linux ARM 32-bit version 4.1.6

 

Kodi 16 log file

Kodi (16.0-ALPHA4 Git:4173817)

OpenELEC (Milhouse) - Version: devel-20151006001946-#1005z-gdc340f5 [build #1005z] 6.0, kernel: Linux ARM 32-bit version 4.1.8

https://www.dropbox.com/s/byv7cei6wu4b6ss/kodi1.log?dl=0

23:52:45 36411.976562 T:1846514752  NOTICE: EMBY WebSocketThread -> logMsg : sendProgressUpdate
23:52:45 36411.984375 T:1846514752  NOTICE: EMBY WebSocketThread -> logMsg : Message data: {"Data": "{\"ItemId\": \"fcd913c78c0d9e44871afb9dc10b1941\", \"QueueableMediaTypes\": \"Video\", \"SubtitleStreamIndex\": \"\", \"MediaSourceId\": \"fcd913c78c0d9e44871afb9dc10b1941\", \"IsMuted\": false, \"PositionTicks\": 77410001, \"IsPaused\": false, \"CanSeek\": true, \"VolumeLevel\": 94, \"PlayMethod\": \"DirectPlay\", \"AudioStreamIndex\": 1}", "MessageType": "ReportPlaybackProgress"}
23:52:47 36414.335938 T:1658758208   ERROR: Exception in thread Thread-110:
                                            Traceback (most recent call last):
                                              File "/home/stephan/projects/openelec-6.0/build.OpenELEC-RPi2.arm-5.95.5/Python-2.7.3/.install_pkg/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/LibrarySync.py", line 1110, in run
                                                self.setUserdata(listItems)
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/LibrarySync.py", line 932, in setUserdata
                                                cursorvideo.execute("SELECT media_type FROM emby WHERE emby_id = ?", (itemId,))
                                            OperationalError: database is locked
23:52:50 36416.988281 T:1846514752  NOTICE: EMBY Player -> logMsg : reportPlayback Called

 

It may help to know what Kodi AddOn's you are running.  In case one of these is locking the db.

Link to comment
Share on other sites

agentxan

The addons that I have installed are

 

Backup

Emby 1.1.44

Keymap Editor

Openelec Configuration

Openelec Dev Update

Common Plugin Cache

Openelec Rpi Config

Skin Widgets

Universal - An Addons Toolkit

Amber Skin

TwitchTV

Youtube

 

Here is a Kodi debug log that list every plugin.

 

http://xbmclogs.com/psp3ddhdt

Edited by agentxan
Link to comment
Share on other sites

Angelblue05

Can you try disabling universal - an addons toolkit and let me know if you still get an error?

 

Edit: it might be something else... I'm still looking at your logs. Will let you know if I find anything.

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
Link to comment
Share on other sites

MSattler

Ok thanks, still looking into it.

 

I think I see this occasionally as well.  Tonight I saw it on the tv show side.

Link to comment
Share on other sites

Angelblue05

I will need to make a version with additional logging. I'm putting it together as we speak. There's one area I suspect might be causing this issue, but I'll need more information because I do not have this issue with 1.1.44.

Link to comment
Share on other sites

Angelblue05

@@agentxan

 

Please install this custom version. It won't fix the issue because I need more information at this point. Set the add-on debug to Info, no need to be set to debug pass this point. Please post your Kodi log when the error happens (database is locked). Thank you.

Edited by Angelblue05
Link to comment
Share on other sites

agentxan

Here is the error and the latest log with the emby version from this thread.

 

https://www.dropbox.com/s/zi82venrlgczflg/kodi4.log?dl=0

01:29:16 10435.627930 T:1670378560  NOTICE: EMBY LibrarySync -> Incremental sync, processing tvshows.
01:29:16 10435.774414 T:1670378560  NOTICE: EMBY LibrarySync -> Incremental sync, processing episode.
01:29:25 10444.553711 T:1670378560   ERROR: Exception in thread Thread-72:
                                            Traceback (most recent call last):
                                              File "/home/stephan/projects/openelec-6.0/build.OpenELEC-RPi2.arm-5.95.5/Python-2.7.3/.install_pkg/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/LibrarySync.py", line 1109, in run
                                                self.IncrementalSync(listItems)
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/LibrarySync.py", line 722, in IncrementalSync
                                                cursor.execute("SELECT kodi_id FROM emby WHERE media_type='tvshow' AND emby_id=?", (MBitem["SeriesId"],))
                                            OperationalError: database is locked
01:29:25 10444.650391 T:1462658112  NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:28
01:29:25 10445.193359 T:1670378560  NOTICE: Thread BackgroundLoader start, auto delete: false
01:30:00 10479.433594 T:1678767168  NOTICE: Previous line repeats 1 times.
Link to comment
Share on other sites

agentxan

I was wondering about the status of this error . I have updated to the latest emby for kodi beta 1.1.51 and am still getting the error. This is on three different pi 2's.

 

Kodi (15.1 Git:f4dda26)

EMBY Version: 1.1.51

 

http://xbmclogs.com/pazbz3dds

13:13:48 1210.108521 T:1652552768  NOTICE: EMBY LibrarySync -> Doing LibraryChanged : Processing Added and Updated : [u'0a600d5659fd4a384480c54e3d88639f', u'4c323c80755d442c8ca615bfcbe54581', u'e97d5a83519f1beb45c46f124ba83196', u'94f3a9b73bc63ed15db168080ae813a1']
13:13:58 1219.950806 T:1644164160   ERROR: Exception in thread Thread-42:
                                            Traceback (most recent call last):
                                              File "/home/stephan/projects/openelec-6.0/build.OpenELEC-RPi2.arm-5.95.5/Python-2.7.3/.install_pkg/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/LibrarySync.py", line 1114, in run
                                                self.setUserdata(listItems)
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/LibrarySync.py", line 936, in setUserdata
                                                cursorvideo.execute("SELECT media_type FROM emby WHERE emby_id = ?", (itemId,))
                                            OperationalError: database is locked
13:13:58 1220.107056 T:1553372224  NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:22
Link to comment
Share on other sites

Angelblue05

Something is keeping your database open. I'm not sure what, because we only use one connection to the database at a time to avoid this situation. Do you have anything else in your Kodi? Do you have videos imported into Kodi? If you go to videos > files, do you see anything? Let me know...

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

agentxan

Right now I have a fresh .kodi directory with just emby for kodi installed. In the videos > files there is nothing listed.

Link to comment
Share on other sites

Angelblue05

Ok, well I'm still looking into it. I will let you know if I find anything. Thanks for your patience.

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

Angelblue05

It seems to be a timing issue. Everytime you got the error, the kodi's videoinfoscanner was running at the exact same time. If it happened to run exactly when we processed something, this would happen: 

13:13:58 1219.950806 T:1644164160   ERROR: Exception in thread Thread-42:
                                            Traceback (most recent call last):
                                              File "/home/stephan/projects/openelec-6.0/build.OpenELEC-RPi2.arm-5.95.5/Python-2.7.3/.install_pkg/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/LibrarySync.py", line 1114, in run
                                                self.setUserdata(listItems)
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/LibrarySync.py", line 936, in setUserdata
                                                cursorvideo.execute("SELECT media_type FROM emby WHERE emby_id = ?", (itemId,))
                                            OperationalError: database is locked
13:13:58 1220.107056 T:1553372224  NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:22

I'll look into a solution for this, as I'm 100% (ok, 95% :) ) sure that's what causing your issue.

Edited by Angelblue05
Link to comment
Share on other sites

Angelblue05

@@agentxan

 

Please try this custom build. Trying something out. If the issue still happens, I will take it a step further. Thank!

 

 

Edited by Angelblue05
  • Like 1
Link to comment
Share on other sites

agentxan

I have been using this custom build on all three of my pi 2's for over 24 hours now and have not saw any error. Thank you for the good work.

  • Like 2
Link to comment
Share on other sites

MSattler

The fix is included in the latest beta version 1.1.53.

 

Will test it this weekend.  Ya know, has anyone done a video yet from the standpoint of fresh Kodi install, installing the Emby Plugin, and then Arctic Zephyr?

 

May help more people understand how it all works.

Link to comment
Share on other sites

I think I'm having this too. Syncs fine at startup but doesn't ever add new items later. Been doing this for a couple weeks & I did a full database wipe on the server & full reinstall for Kodi yesterday & it's still doing it.

 

Emby 1.1.53, Server 3.0.5768.6, Kodi 15.2, with Titan 3.4.13

 

Edit: Added Log. Ran for awhile with it never adding anything new until I did a manual sync & it added 2 items.

kodi.log

Edited by riffy
Link to comment
Share on other sites

Angelblue05

Ok, then I guess I'll have to fix this, a step further than what I already put in place. You will need to give me a bit for the fix. I'll let you know once I have something for you to test @@riffy. Thanks

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...