jakewaldron / PlexEmail

This script aggregates all new TV, movie and music releases for the past configured time then optionally writes to your web directory and sends out an email.
206 stars 32 forks source link

Corrupted Plex DB #8

Closed make92 closed 7 years ago

make92 commented 8 years ago

i tested your PlexEmail and initially everything looked great but then i started to get problems that my Plex library DB got corrupted.

any idea what exactly is causing that. as soon as i disabled PlexEmail the DB is stable

Matt

morbidpete commented 8 years ago

I had the same issue. I cause it thinking when i did my first test script, it took so long i force stopped it and corrupted the DB. I restored a back up. Did the same thing to verify that is in fact what corrupted it and same result. I now let it run its course :-P (daily DB backups help)

make92 commented 8 years ago

What I figured out was that it o ly happened when I was using Plexemail in a Docker on my Unraid server. Now it's running in a VM on Linux mint without any problems.

jakewaldron commented 7 years ago

I've made some changes around the DB usage in the dev branch. It now properly closes connections and before opening the db files, it first makes a copy (and deletes the copy after closing the db connection). This should prevent corruption issues in the future.

jakewaldron commented 7 years ago

Dev branch has been merged into master. Closing.