The last week my Plex server keeps losing connection at around 10:00am every day. It is usually up and running 2 minutes later.
Looking at my network logs, I can see that no packet is being dropped, and all of the services on my server works fine. All other connected devices work fine as well.
Only Plex Media Server is losing connection.
I have provided the logs that occured around the time PMS went down today, but it looks like it perhaps gets stuck on the database optimization? Which is also weird, because maintence window is between 00:00 am and 03:00 am…
Server Version#: Version 1.41.1.9057
Player Version#:
Oct 30, 2024 10:09:04.648 [127893956193080] WARN - [Req#6445f/Database optimization/com.plexapp.plugins.library.db/DatabaseFixups] Held transaction for too long (/home/runner/actions-runner/_work/plex-media-server/plex-media-server/Library/DatabaseFixups.cpp:363): 0.230000 seconds
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db/DatabaseFixups] Running database fix-ups completed in 0.8 seconds.
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 0.
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 1.
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 2.
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 3.
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 4.
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 5.
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 6.
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 7.
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 8.
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 9.
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 10.
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 11.
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 12.
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 13.
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 14.
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 15.
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 16.
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 17.
Oct 30, 2024 10:09:04.695 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 18.
Oct 30, 2024 10:09:06.771 [127894223231800] DEBUG - Auth: authenticated user 71675212 as xxx
Oct 30, 2024 10:09:13.263 [127894221122360] DEBUG - Auth: authenticated user 20688234 as xxx
Oct 30, 2024 10:09:50.472 [127894011235128] DEBUG - [Req#63f38] BPQ: onConsiderProcessing: Idle (true)
Oct 30, 2024 10:09:50.472 [127894011235128] DEBUG - [Req#63f38] BPQ: [Idle] -> [Processing]
Oct 30, 2024 10:10:20.046 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Captured session 19.
Oct 30, 2024 10:10:20.046 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Rebuilding full text search tables.
Oct 30, 2024 10:10:20.047 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Activity: updated activity 08470f86-d653-49b0-b3fc-901e54bf7caa - completed 40.0% - Optimizing database
Oct 30, 2024 10:10:20.047 [127893958302520] DEBUG - Activity: updated activity d55f38a3-50b4-42ec-875c-5a7122a3a3ec - completed 25.0% - Cleaning bundles
Oct 30, 2024 10:10:20.047 [127893958302520] DEBUG - Activity: updated activity d55f38a3-50b4-42ec-875c-5a7122a3a3ec - completed 50.0% - Cleaning bundles
Oct 30, 2024 10:10:25.287 [127893956193080] WARN - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Held transaction for too long (/home/runner/actions-runner/_work/plex-media-server/plex-media-server/Library/FullTextSearch.cpp:58): 2.520000 seconds
Oct 30, 2024 10:10:31.802 [127893956193080] WARN - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Held transaction for too long (/home/runner/actions-runner/_work/plex-media-server/plex-media-server/Library/FullTextSearch.cpp:71): 1.040000 seconds
Oct 30, 2024 10:10:48.176 [127893956193080] WARN - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Held transaction for too long (/home/runner/actions-runner/_work/plex-media-server/plex-media-server/Library/FullTextSearch.cpp:81): 5.810000 seconds
Oct 30, 2024 10:10:56.773 [127893956193080] WARN - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Held transaction for too long (/home/runner/actions-runner/_work/plex-media-server/plex-media-server/Library/FullTextSearch.cpp:94): 3.470000 seconds
Oct 30, 2024 10:10:57.481 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Database optimization: starting.
Oct 30, 2024 10:10:57.481 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Activity: updated activity 08470f86-d653-49b0-b3fc-901e54bf7caa - completed 60.0% - Optimizing database
Oct 30, 2024 10:11:41.484 [127893956193080] DEBUG - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] Database optimization: complete.
Oct 30, 2024 10:11:41.488 [127893956193080] INFO - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 60: [select * from metadata_items limit 1] database schema has changed
Oct 30, 2024 10:11:41.492 [127893956193080] INFO - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 60: [select * from metadata_items limit 1] database schema has changed
Oct 30, 2024 10:11:41.496 [127893956193080] INFO - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 60: [select * from metadata_items limit 1] database schema has changed
Oct 30, 2024 10:11:41.499 [127893956193080] INFO - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 60: [select * from metadata_items limit 1] database schema has changed
Oct 30, 2024 10:11:41.502 [127893956193080] INFO - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 60: [select * from metadata_items limit 1] database schema has changed
Oct 30, 2024 10:11:41.504 [127893956193080] INFO - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 60: [select * from metadata_items limit 1] database schema has changed
Oct 30, 2024 10:11:41.509 [127893956193080] INFO - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 60: [select * from metadata_items limit 1] database schema has changed
Oct 30, 2024 10:11:41.514 [127893956193080] INFO - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 60: [select * from metadata_items limit 1] database schema has changed
Oct 30, 2024 10:11:41.519 [127893956193080] INFO - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 60: [select * from metadata_items limit 1] database schema has changed
Oct 30, 2024 10:11:41.523 [127893956193080] INFO - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 60: [select * from metadata_items limit 1] database schema has changed
Oct 30, 2024 10:11:41.528 [127893956193080] INFO - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 60: [select * from metadata_items limit 1] database schema has changed
Oct 30, 2024 10:11:41.532 [127893956193080] INFO - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 60: [select * from metadata_items limit 1] database schema has changed
Oct 30, 2024 10:11:41.537 [127893956193080] INFO - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 60: [select * from metadata_items limit 1] database schema has changed
Oct 30, 2024 10:11:41.541 [127893956193080] INFO - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 60: [select * from metadata_items limit 1] database schema has changed
Oct 30, 2024 10:11:41.545 [127893956193080] INFO - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 60: [select * from metadata_items limit 1] database schema has changed
Oct 30, 2024 10:11:41.548 [127893956193080] INFO - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 60: [select * from metadata_items limit 1] database schema has changed
Oct 30, 2024 10:11:41.551 [127893956193080] INFO - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 60: [select * from metadata_items limit 1] database schema has changed
Oct 30, 2024 10:11:41.555 [127893956193080] INFO - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 60: [select * from metadata_items limit 1] database schema has changed
Oct 30, 2024 10:11:41.558 [127893956193080] INFO - [Req#6445f/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 60: [select * from metadata_items limit 1] database schema has changed
Oct 30, 2024 10:11:41.560 [127893958302520] DEBUG - Deleted 0 metadata bundles.
Oct 30, 2024 10:11:41.560 [127893958302520] DEBUG - Activity: updated activity d55f38a3-50b4-42ec-875c-5a7122a3a3ec - completed 50.0% - Cleaning bundles
Oct 30, 2024 10:11:41.562 [127893988338488] DEBUG - Request: [192.168.1.54:61075 (Allowed Network (Subnet))] GET /:/timeline?bufferedTime=232&col=6&context=preplay&duration=3099604&key=%2Flibrary%2Fmetadata%2F535689&location=lan&playQueueItemID=488303&playbackTime=125298&ratingKey=535689&row=0&state=playing&time=1556480 (9 live) #64478 TLS GZIP Signed-in Token (xxx)
Oct 30, 2024 10:11:41.562 [127894223231800] DEBUG - Failed to stream media, client probably disconnected after 233979904 bytes: 32 - Broken pipe
Oct 30, 2024 10:11:41.562 [127894223231800] DEBUG - Completed after connection close: [192.168.1.54:51714] 206 GET /library/parts/247555/1727468410/file.mkv (9 live) #6360d TLS 393353ms 233979904 bytes (range: bytes=918831398-)
Oct 30, 2024 10:11:41.562 [127893996710712] DEBUG - Request: [79.136.16.118:40108 (WAN)] GET /:/timeline?audioStreamID=839357&bufferedTime=309104&context=source%3Acontent.watchlist.all&duration=2424064&guid=local%3A%2F%2F481034&key=%2Flibrary%2Fmetadata%2F481034&playbackTime=427851&playQueueItemID=488264&ratingKey=481034&state=playing&time=2114960&token=xxxxxxxxxxxxxxxxxxxx (9 live) #64475 TLS GZIP Signed-in Token (xxx)
Oct 30, 2024 10:11:41.562 [127894221122360] DEBUG - WebSocket: client initiated close
Oct 30, 2024 10:11:41.563 [127894223231800] DEBUG - handleStreamRead code 1: stream truncated
Oct 30, 2024 10:11:41.563 [127894223231800] DEBUG - NotificationStream: Removing because of error
Oct 30, 2024 10:11:41.563 [127894011235128] DEBUG - [Req#63f38] BPQ: generating queue items from 0 generator(s)
Oct 30, 2024 10:11:41.563 [127894011235128] DEBUG - [Req#63f38] BPQ: generated 0 item(s) for queue
Oct 30, 2024 10:11:41.563 [127894223231800] DEBUG - Completed after connection close: [172.18.0.4:36206] -3 GET /:/websockets/notifications (10 live) #1a TLS 127483574ms 16987357 bytes
Oct 30, 2024 10:11:41.563 [127894221122360] DEBUG - [EventSourceClient/pubsub/172.104.145.70:443] Failure: 9 - Bad file descriptor.
Oct 30, 2024 10:11:41.564 [127894221122360] DEBUG - [EventSourceClient/pubsub/172.104.145.70:443] MyPlex: We appear to have lost Internet connectivity, resetting device URL cache.
Oct 30, 2024 10:11:41.564 [127893988338488] DEBUG - [Req#64478] Client [5699EB89-F93D-4309-BEA8-82C17CFFCC8F] reporting timeline state playing, progress of 1556480/3099604ms for guid=, playbackTime=125298ms ratingKey=535689 url=, key=/library/metadata/535689, containerKey=, metadataId=535689, source=
Oct 30, 2024 10:11:41.564 [127893996710712] DEBUG - [Req#64475] Client [e94d99a70969ea85-com-plexapp-android] reporting timeline state playing, progress of 2114960/2424064ms for guid=local://481034, playbackTime=427851ms ratingKey=481034 url=, key=/library/metadata/481034, containerKey=, metadataId=481034, source=
Oct 30, 2024 10:11:41.565 [127894221122360] ERROR - [EventSourceClient/pubsub/172.104.145.70:443] Retrying in 15 seconds.