- Database is still messed up. We may need take that to the next level of optimization (manual SQL)
- You should also resolve your domain issue at some point… It’s not your root cause but it will eventually cause you grief because
.lan is for the LAN but PMS sees the domain name, doesn’t know about it, and therefore treats as remote.
May 19, 2018 19:48:47.246 [0x7fd2253ff700] DEBUG - Updating metadata item (save) () with ID 67214
May 19, 2018 19:48:47.249 [0x7fd2253ff700] DEBUG - Doing expensive tags write for 'Pretty Little Liars' because something changed.
May 19, 2018 19:48:47.256 [0x7fd2253ff700] DEBUG - Doing expensive tags write for 'Pretty Little Liars' because something changed.
May 19, 2018 19:48:47.278 [0x7fd2253ff700] DEBUG - Doing expensive tags write for 'Pretty Little Liars' because something changed.
May 19, 2018 19:48:47.334 [0x7fd2253ff700] DEBUG - Loaded metadata for Pretty Little Liars (ID 67213) in 550.000000 ms
May 19, 2018 19:48:47.334 [0x7fd2253ff700] DEBUG - There was a change for metadata item 67213 (Pretty Little Liars), saving.
May 19, 2018 19:48:47.334 [0x7fd2253ff700] DEBUG - Updating metadata item (save) (Pretty Little Liars) with ID 67213
May 19, 2018 19:48:47.336 [0x7fd2253ff700] DEBUG - Done with metadata update for 67213
May 19, 2018 19:48:48.849 [0x7fd212bff700] DEBUG - Killing job.
May 19, 2018 19:48:48.849 [0x7fd212bff700] DEBUG - Signalling job ID 15445 with 9
May 19, 2018 19:48:48.849 [0x7fd212bff700] DEBUG - Media Analyzer: Background analysis completed in 30.0 seconds, removing 1 IDs
May 19, 2018 19:48:48.852 [0x7fd243fff700] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Media Scanner' exit code for process 15445 is -9 (signal: Killed)
May 19, 2018 19:48:48.853 [0x7fd23cbfd700] WARN - SLOW QUERY: It took 350.000000 ms to retrieve 3 items.
May 19, 2018 19:48:48.853 [0x7fd230fff700] WARN - SLOW QUERY: It took 350.000000 ms to retrieve 3 items.
May 19, 2018 19:48:48.855 [0x7fd2413fe700] DEBUG - Completed: [192.168.1.29:33598] 200 GET /library/metadata/67294 (18 live) 30013ms 2287 bytes (pipelined: 1)
May 19, 2018 19:48:48.855 [0x7fd2413fe700] DEBUG - Completed: [192.168.1.29:34154] 200 GET /library/metadata/67294 (18 live) 14998ms 2287 bytes (pipelined: 1)
May 19, 2018 19:48:48.857 [0x7fd2413fe700] DEBUG - Auth: authenticated user 1 as foogama
May 19, 2018 19:48:48.857 [0x7fd20f3f8700] DEBUG - Request: [192.168.1.29:34540 (Allowed Network)] GET /library/metadata/67271 (18 live) Signed-in Token (foogama)
Whatever is happening on your machine at this moment in time is bringing it to its kneeds.
- You state it stops responding
- I see metadata retrieval stops
- I see the database comes slamming down.
This is simply unacceptable on a Xeon class machine.
Why does the time you state not match the time in the logs? you say 02 and the logs have 23. When you say 22, the logs said 02.
Did you grab an incorrect one by accident? (I’ve done it so no big deal if you did) Is your machine in the right TimeZone / Date/Time sync’d with
- CPU overload
- I/O overload
- Database fragmentation requiring manual intervention (dependent on the total number of indexed items)
- Completely junked up data directories from previously failed matching / retrieval attempts
First, metadata retrieval area cleanup.
- Stop PMS
sudo rm -rf "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Caches/*"
- Start PMS
- Rescan the libraries and make sure all matching & metadata retrieval complete successfully.
- If metadata retrieval and/or web interface is still sluggish, (again, number of items dependent – load time), manually optimize the database (see below)
- Again attempt to complete matching.
Before next playback, If there’s anything you can shut down (other processes / background tasking) you have on the box while playing, try it. see what happens.
Manual database optimization
cd "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases"
sqlite3 com.plexapp.plugins.library.db .dump > database.sql
ls -la database.sql # verify size is larger than binrary `.db` as this is the exported ascii source form
mv com.plexapp.plugins.library.db com.plexapp.plugins.library.db.old
rm -f *-shm *-wal
sqlite3 com.plexapp.plugins.library.db < database.sql
chown plex:plex com.plexapp.plugins.library.db
Wait 30 seconds for database indexes to regenerate
Resume testing metadata retrieval and other functions.