Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Latest version of PMS crashes regularly

ArnyArny Posts: 28Members, Plex Pass Plex Pass
As I say in the topic, the latest version of the PMS has been crashing quite regularly on my Mac Mini, roughly once every 1-2 days. I've been running Plex on this system for ages without any problems, and the PMS update is the only recent change to my setup.

Has anyone else experienced anything like this with this version? I'd like some help debugging this issue if possible.
«1

Comments

  • TrudgeTrudge Gone off to greener pastures.... Posts: 9,360Members ✭✭✭
    Trahern wrote:

    As I say in the topic, the latest version of the PMS has been crashing quite regularly on my Mac Mini, roughly once every 1-2 days. I've been running Plex on this system for ages without any problems, and the PMS update is the only recent change to my setup.

    Has anyone else experienced anything like this with this version? I'd like some help debugging this issue if possible.

    Are you sure you are on the latest version (.9.7.7) - the previous version (.9.7.3) had a bug that caused exactly what you are seeing which was fixed in .9.7.7. If you are on .9.7.7 then crashdumps and logs would be needed.
  • ArnyArny Posts: 28Members, Plex Pass Plex Pass
    edited December 2012
    Ah, that must be it. I've just gone and checked and the update notification came up.

    False alarm, thanks for the heads up.
  • drewe2000drewe2000 Posts: 48Members, Plex Pass Plex Pass
    Trahern wrote:

    Ah, that must be it. I've just gone and checked and the update notification came up.

    False alarm, thanks for the heads up.


    Real alarm for me though.
    I was having at least daily crashes before updating to the most recent version. Now that I have, the crashes are continuing. I've attached the most recent crash log here. Any thoughts?

    Thanks!
  • TrudgeTrudge Gone off to greener pastures.... Posts: 9,360Members ✭✭✭
    drewe2000 wrote:

    Real alarm for me though.
    I was having at least daily crashes before updating to the most recent version. Now that I have, the crashes are continuing. I've attached the most recent crash log here. Any thoughts?

    Thanks!

    Possible DB issue, what does Plex Media Server.log say (~/Library/Logs)
  • drewe2000drewe2000 Posts: 48Members, Plex Pass Plex Pass
    Trudge wrote:

    Possible DB issue, what does Plex Media Server.log say (~/Library/Logs)


    Sorry about the delay, I forgot to attach the log (which I've done now). I've cropped it down to the last bit - it seems like it was struggling to update something. There was a show paused overnight, but I don't think that's why it crashed eventually.

    This seems to be where it got hung up:

    Dec 07, 2012 07:35:55 [0xb0289000] WARN - Error starting transaction (/Users/plex/jenkins/workspace/PlexMediaServer-NightlyReleases/label/build-macosx-snowleopard/Library/MetadataItemSetting.cpp:34) (tries=2): Cannot begin transaction. cannot start a transaction within a transaction
    Dec 07, 2012 07:35:56 [0xb0eca000] WARN - Waited one whole second for a busy database.
    Dec 07, 2012 07:35:57 [0xb0289000] ERROR - SQLITE3:a, 1, statement aborts at 4: [BEGIN IMMEDIATE] cannot start a transaction within a transaction
    Dec 07, 2012 07:35:57 [0xb0289000] WARN - Error starting transaction (/Users/plex/jenkins/workspace/PlexMediaServer-NightlyReleases/label/build-macosx-snowleopard/Library/MetadataItemSetting.cpp:34) (tries=1): Cannot begin transaction. cannot start a transaction within a transaction

    But I'm not experienced or knowledgable at all regarding these logs. I could guess at the problem but I'd probably be wrong.
    I can say that PMS is running on Mountain Lion, but that probably doesn't matter.

    If it happens again, I'll see if it displays anything differently.
  • TrudgeTrudge Gone off to greener pastures.... Posts: 9,360Members ✭✭✭
    drewe2000 wrote:

    Sorry about the delay, I forgot to attach the log (which I've done now). I've cropped it down to the last bit - it seems like it was struggling to update something. There was a show paused overnight, but I don't think that's why it crashed eventually.

    This seems to be where it got hung up:

    Dec 07, 2012 07:35:55 [0xb0289000] WARN - Error starting transaction (/Users/plex/jenkins/workspace/PlexMediaServer-NightlyReleases/label/build-macosx-snowleopard/Library/MetadataItemSetting.cpp:34) (tries=2): Cannot begin transaction. cannot start a transaction within a transaction
    Dec 07, 2012 07:35:56 [0xb0eca000] WARN - Waited one whole second for a busy database.
    Dec 07, 2012 07:35:57 [0xb0289000] ERROR - SQLITE3:a, 1, statement aborts at 4: [BEGIN IMMEDIATE] cannot start a transaction within a transaction
    Dec 07, 2012 07:35:57 [0xb0289000] WARN - Error starting transaction (/Users/plex/jenkins/workspace/PlexMediaServer-NightlyReleases/label/build-macosx-snowleopard/Library/MetadataItemSetting.cpp:34) (tries=1): Cannot begin transaction. cannot start a transaction within a transaction

    But I'm not experienced or knowledgable at all regarding these logs. I could guess at the problem but I'd probably be wrong.
    I can say that PMS is running on Mountain Lion, but that probably doesn't matter.

    If it happens again, I'll see if it displays anything differently.

    Yep, definitely a database problem. Those error imply that it has stalled, If you restart the PMS, do the same errors come up in the log again? If so, i might be more just stalled and you should give a repair a try -> http://wiki.plexapp.com/index.php/PlexNine_Tips_and_Tricks#Repairing_a_corrupt_database
  • drewe2000drewe2000 Posts: 48Members, Plex Pass Plex Pass
    Trudge wrote:

    Yep, definitely a database problem. Those error imply that it has stalled, If you restart the PMS, do the same errors come up in the log again? If so, i might be more just stalled and you should give a repair a try -> http://wiki.plexapp.com/index.php/PlexNine_Tips_and_Tricks#Repairing_a_corrupt_database


    Interesting. Thanks. I restarted it and, sure enough, it happened again. Oddly, the show I was watching played through to the end but then Plex couldn't find the server afterwards. Of course, it had crashed. I'm attaching the crash log file to this message, but I don't think the logs are substantially different than before.

    Again, the relevant part from the Plex Media Server log is:

    Dec 07, 2012 18:17:54 [0xb0e48000] ERROR - SQLITE3:a, 1, statement aborts at 4: [BEGIN IMMEDIATE] cannot start a transaction within a transaction
    Dec 07, 2012 18:17:54 [0xb0e48000] WARN - Error starting transaction (/Users/plex/jenkins/workspace/PlexMediaServer-NightlyReleases/label/build-macosx-snowleopard/Library/MetadataItemSetting.cpp:34) (tries=2): Cannot begin transaction. cannot start a transaction within a transaction
    Dec 07, 2012 18:17:54 [0xb0e48000] ERROR - SQLITE3:a, 1, statement aborts at 4: [BEGIN IMMEDIATE] cannot start a transaction within a transaction
    Dec 07, 2012 18:17:54 [0xb0e48000] WARN - Error starting transaction (/Users/plex/jenkins/workspace/PlexMediaServer-NightlyReleases/label/build-macosx-snowleopard/Library/MetadataItemSetting.cpp:34) (tries=1): Cannot begin transaction. cannot start a transaction within a transaction

    I will try your suggestion of repairing the database. If the problem continues after that, I might just have to start the library over from scratch, which seems drastic.
  • drewe2000drewe2000 Posts: 48Members, Plex Pass Plex Pass
    Hm..

    I ran this:

    sqlite3 ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db "PRAGMA integrity_check"
    


    and the result is:

    ok
    



    Is it worthwhile for me to "repair" the database with a dump and restore? (or deleting it and just letting PMS restart without a database, meaning it builds a new one?)

    echo .dump | sqlite3 ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db > dump.sql
    sqlite3 -init dump.sql ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db
    


    I hesitate only because the result of the database check is "ok" - but something is clearly causing a logjam which crashes PMS for me.
  • TrudgeTrudge Gone off to greener pastures.... Posts: 9,360Members ✭✭✭
    drewe2000 wrote:

    Is it worthwhile for me to "repair" the database with a dump and restore? (or deleting it and just letting PMS restart without a database, meaning it builds a new one?)

    echo .dump | sqlite3 ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db > dump.sql
    sqlite3 -init dump.sql ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db
    


    I hesitate only because the result of the database check is "ok" - but something is clearly causing a logjam which crashes PMS for me.

    It can't hurt it more, just make a copy of it first if you are a little worried.
  • drewe2000drewe2000 Posts: 48Members, Plex Pass Plex Pass
    Trudge wrote:

    It can't hurt it more, just make a copy of it first if you are a little worried.


    Excellent point. I'll give it a shot and report back. Thanks.
  • jsponziljsponzil Posts: 8Members ✭✭
    I don't have anything helpful to add here, but I'm having a similar issue. I have an early 2009 Mini running 10.7.5 and PMS .9.7.7. I'm going to go through the logs and try to see if I see something similar to what drewe has seen.
  • TrudgeTrudge Gone off to greener pastures.... Posts: 9,360Members ✭✭✭
    eldo73 wrote:

    I don't have anything helpful to add here, but I'm having a similar issue. I have an early 2009 Mini running 10.7.5 and PMS .9.7.7. I'm going to go through the logs and try to see if I see something similar to what drewe has seen.

    if you don't see anything obvious, logs and crashdump pls :)
  • jsponziljsponzil Posts: 8Members ✭✭
    OK, first some background. I've been using Plex for a long time (since before Alexandria) for the most part trouble free. I recently tried to breathe new life into my 2.0 GHz C2D early 2009 Mini (intel graphics) through a ram and SSD upgrade. It now has 4GB ram and a 180 GB Intel SSD. Everything seems to work very snappy and no obvious problems. It has a clean install of OSX 10.7.5 as well as PMS 0.9.7.7 and the latest client. Normally I run SABnzbd and Sickbeard on this computer, but I've shut both off as I've tried to troubleshoot this issue. The computer acts as a local client in my theater room as well as serving media up to multiple iOS devices and a few Roku's both locally and via myPlex. I'm going to attach the PMS log, though to my (fairly ignorant) reading, I don't see anything suspicious. Regular crashes began with 0.9.7.3 and continued with the 0.9.7.7 upgrade. Any help is greatly appreciated!
  • jsponziljsponzil Posts: 8Members ✭✭
    eldo73 wrote:

    OK, first some background. I've been using Plex for a long time (since before Alexandria) for the most part trouble free. I recently tried to breathe new life into my 2.0 GHz C2D early 2009 Mini (intel graphics) through a ram and SSD upgrade. It now has 4GB ram and a 180 GB Intel SSD. Everything seems to work very snappy and no obvious problems. It has a clean install of OSX 10.7.5 as well as PMS 0.9.7.7 and the latest client. Normally I run SABnzbd and Sickbeard on this computer, but I've shut both off as I've tried to troubleshoot this issue. The computer acts as a local client in my theater room as well as serving media up to multiple iOS devices and a few Roku's both locally and via myPlex. I'm going to attach the PMS log, though to my (fairly ignorant) reading, I don't see anything suspicious. Regular crashes began with 0.9.7.3 and continued with the 0.9.7.7 upgrade. Any help is greatly appreciated!



    Forgot the Log!
  • TrudgeTrudge Gone off to greener pastures.... Posts: 9,360Members ✭✭✭
    eldo73 wrote:

    Forgot the Log!

    nothing nasty in that log (it did crash during the timeframe of the logging right?) so a crash dump might prove the most helpful.
  • jsponziljsponzil Posts: 8Members ✭✭
    That's what I thought, too.

    I should probably clarify my symptoms. The PMS will run normally for up to 36 hours or so, then it stops responding. Sometimes it will crash while serving something up, sometimes it is (seemingly) idle. The Mini is still on (light is solid not blinking), but unresponsive. No video output, cant Screen Share into it. I haven't tried ssh. A hard reboot clears it up for a while and then it starts all over again.

    I've been looking through the various log files and I don't see anything helpful. There is no crash dump for PMS, either. I'm thinking this may be unrelated to PMS. My Time Capsule has been acting up lately, I think its on its last legs. I know that it is causing hangs on my other computer, is it possible that it is causing the Mini to behave like this as well?
  • TrudgeTrudge Gone off to greener pastures.... Posts: 9,360Members ✭✭✭
    eldo73 wrote:

    My Time Capsule has been acting up lately, I think its on its last legs. I know that it is causing hangs on my other computer, is it possible that it is causing the Mini to behave like this as well?

    it's possible, does it hold your media or just for time machine? Try turning it off for 2 or 3 days and see what happens.
  • drewe2000drewe2000 Posts: 48Members, Plex Pass Plex Pass
    Just to pipe in with an update on my issue - deleting and recreating the database (a pain) has worked. No crashes of PMS 0.9.7.7 since then (well oer 24 hours, which is much longer than the time it lasted before). If it starts to recur, I'll let you know. It was a new installation with a new database, so I don't know why the problem popped up to begin with.

    Thanks for the assistance.
  • drewe2000drewe2000 Posts: 48Members, Plex Pass Plex Pass
    edited December 2012
    Sigh... PMS 0.9.7.7 has resumed crashing for me. It's become progressively worse. When I first recreated the database, it worked ok for several days. I left town last weekend, and when I tried to use Plex on my iPad, PMS had crashed. I had to log in remotely to start it, then use Plex on my iPad as planned. But over the past day or 2, it's crashing more and more frequently (sometimes while left alone, sometimes while Plex is playing content on the same Mac mini - and I find out after the show ends that the server is no longer running.) Now, PMS literally won't get past the booting phase and then crashes.

    The log is complaining that the "database is locked" - I don't know how PMS did that and then crashed, leaving it in that state.

    I tried checking the database integrity, but still get "database is locked":
    ~ sqlite3 ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db "PRAGMA integrity_check"
    ~ Error: database is locked
    


    So I duplicated the database file, deleted the original, and renamed the copy to replace the original file. And the "database is locked" issue went away, allowing PMS to launch successfully.

    Just to be complete, I then checked the database integrity, which turned out fine:
    ~ sqlite3 ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db "PRAGMA integrity_check"
    ~ ok
    


    I'm just posting this here in case anyone else has the same problem in the future.

    I don't think the crashing of increasing frequency is resolved though. If it continues, I'll post the logs.

    On a side note, does anyone have suggestions for getting PMS set up with a launchagent to restart it in the event of crash? I haven't had much luck. How to setup a launchagent for PMS? Whatever I choose to target fails to restart after a crash...
  • jhodgesatmbjhodgesatmb Posts: 75Members, Plex Pass ✭✭
    I have had a lot of crashes of the client lately so I decided to upgrade to PMS 0.9.7.7 (not the client but I was hopeful). Big mistake. In the past I have had client crashes (a lot, on all types of movies) but PMS almost never crashed and never all by itself (without me playing any movie at all). But it is now. So whatever the original poster ran into s/he is not alone and something needs to be done. I am sending crash reports for both the client and the media server and the last couple of days of logs for PMS.
«1
Sign In or Register to comment.