Jump to content

Library Sync Thread exiting even more frequently


naf623
 Share

Recommended Posts

naf623

HW: Raspberry Pi 2 B

OS: OpenELEC 6.0.3 (Kernel: Linux 41.18

Kodi: 15.2

Emby Add On: 2.2.10

Emby Server: 3.0.5973.0

 

Logs (DD.MM_HHMMSS): https://www.dropbox.com/sh/u2temtarmawdfpb/AAAj1C7pKFL_vJb-FeWR_u6Ua?dl=0

 

I'm getting "Library Sync Thread has exited" over and over again. You can see from the log times that I'll reboot, and it'll do it again shortly after. Eventually it seems to complete updates, but sometimes I'll spend an hour restarting again and again.

 

Always seems to be the same error:

OperationalError: database is locked
Link to comment
Share on other sites

Angelblue05

I've been looking into what we can do to handle this issue gracefully.

 

Since I'm unable to personally reproduce this issue, can you test this build and let me know if it behaves better? 

  • Like 1
Link to comment
Share on other sites

naf623

Still seems to be working a treat. Added a bunch of new stuff, and while the update was going, messed around on Kodi. Nothing caused a crash.

  • Like 1
Link to comment
Share on other sites

Angelblue05

That's really good. Thanks a lot for confirming it does help. I will keep it in mind when I make the next beta build. :)

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

naf623

What did you change? A retry like null suggested?

Its actually made Kodi feel more responsive during updates, I think...

Edited by naf623
Link to comment
Share on other sites

Angelblue05

What null suggested is already being worked on, however it's not completed yet. No all I did was enable auto commit on the connection to the database, this way, we can avoid locking the database. It's not a fix, but may very well be a step in the right direction, since our database transactions are usually small. But we still have some work to do in this area.

 

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
Link to comment
Share on other sites

naf623

Seems to be working a treat. I did have one crash, but think other stuff was going on as well:

ERROR: Exception in thread Thread-10:
                                            Traceback (most recent call last):
                                              File "/home/stephan/projects/openelec-6.0/build.OpenELEC-RPi.arm-6.0.3/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 900, in run
                                                self.run_internal()
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/librarysync.py", line 970, in run_internal
                                                librarySync = self.startSync()
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/librarysync.py", line 89, in startSync
                                                completed = self.fastSync()
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/librarysync.py", line 107, in fastSync
                                                lastSyncTime = utils.convertDate(lastSync)
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/utils.py", line 225, in convertDate
                                                date = datetime.strptime(date, "%Y-%m-%dT%H:%M:%SZ")
                                            ImportError: Failed to import _strptime because the import lockis held by another thread.
  • Like 1
Link to comment
Share on other sites

Angelblue05

The temporary fix for the database being locked has been released with the latest beta. Note that I made it a setting (under sync options), because it effect the speed of the sync in general. I would imagine, it would extend the initial sync quite a bit, also. So best have it disabled by default.

Link to comment
Share on other sites

  • 1 month later...
naf623

Wow, it certainly slows sync down significantly. Doing a reinstall and syncing my entire library from scratch, each movie takes over 10 seconds to process... No crashes, though :)

Link to comment
Share on other sites

Angelblue05

Yeah, you don't need to have the setting enabled during the initial sync because it's unlikely something else would try to access the database at the same time. Anyway, it's only temporary, hopefully we'll get around to solidifying the process soon. So if you ever need to reset again, disable the setting first, then reset. :)

Edited by Angelblue05
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...