Plex crashing every night

Server Version#: 1.41.5.9522
Player Version#: N/A

I have been running the plexpass Docker container for years now, with virtually no issues. The last three nights I have woken up to the container reporting unhealthy, and Plex no longer operating. I have captured the log from the most recent crash; the container reported as unhealthy at 5:04am, but the log continues to show Plex having activity of some sort. Included below is a clip of the log from around the time of the crash. I didn’t save the logs from the previous nights, but will do so again tonight if it crashes again.

I have not made any significant changes to my system in the last few weeks, there is no obvious cause for what has made it start crashing other than perhaps new media which is causing instability.

Mar 07, 2025 05:03:50.804 [138323779660600] DEBUG - [Now] Removing idle session for device w4h0c4op5d77rxkfbx3u2eo7_Video.
Mar 07, 2025 05:03:50.804 [138323779660600] DEBUG - Statistics: (grnthgqfd9qmtjnncvy1d9hk) Reporting active playback in state 3 of type 4 (scrobble: 0) for account 3565440
Mar 07, 2025 05:04:04.685 [138323897101112] DEBUG - Shutting down idle session sidnn0kd1thh1otvo7gvwfoc (idle time is 180 seconds)
Mar 07, 2025 05:04:04.685 [138323897101112] DEBUG - Killing job.
Mar 07, 2025 05:04:04.685 [138323897101112] DEBUG - Signalling job ID 157343 with 9
Mar 07, 2025 05:04:04.685 [138323897101112] DEBUG - Job was already killed, not killing again.
Mar 07, 2025 05:04:04.685 [138323897101112] DEBUG - Stopping transcode session sidnn0kd1thh1otvo7gvwfoc
Mar 07, 2025 05:04:04.685 [138323762883384] DEBUG - Cleaning directory for session sidnn0kd1thh1otvo7gvwfoc (/transcode/Transcode/Sessions/plex-transcode-sidnn0kd1thh1otvo7gvwfoc-5b27a409-4780-4e2a-ab1b-5ab11e1dec1d)
Mar 07, 2025 05:04:04.688 [138324037610296] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Transcoder' exit code for process 157343 is -9 (signal: Killed)
Mar 07, 2025 05:04:04.692 [138323897101112] DEBUG - Whacked session sidnn0kd1thh1otvo7gvwfoc, 1 remaining.
Mar 07, 2025 05:04:04.692 [138323897101112] DEBUG - Killed 1 idle sessions out of a total of 2.
Mar 07, 2025 05:04:04.700 [138323762883384] DEBUG - Cleaning directory for session sidnn0kd1thh1otvo7gvwfoc (/transcode/Transcode/Sessions/plex-transcode-sidnn0kd1thh1otvo7gvwfoc-5b27a409-4780-4e2a-ab1b-5ab11e1dec1d)
Mar 07, 2025 05:04:19.839 [138323762883384] DEBUG - [Req#11572b/Transcode] Streaming Resource: Timing out session 0x7dce0ce0bcc8:w4h0c4op5d77rxkfbx3u2eo7
Mar 07, 2025 05:04:19.839 [138323762883384] DEBUG - [Req#11572b/Transcode] Streaming Resource: Terminating session 0x7dce0ce0bcc8:w4h0c4op5d77rxkfbx3u2eo7 which is using 3266kbps of WAN bandwidth.  Used is now 0kbps
Mar 07, 2025 05:04:19.839 [138323762883384] DEBUG - [Req#11572b/Transcode] Streaming Resource: Terminated session 0x7dce0ce0bcc8:w4h0c4op5d77rxkfbx3u2eo7 with reason Client stopped playback.
Mar 07, 2025 05:04:19.839 [138323762883384] DEBUG - [Req#11572b/Transcode] Streaming Resource: Removing session 0x7dce0ce0bcc8:w4h0c4op5d77rxkfbx3u2eo7
Mar 07, 2025 05:05:18.884 [138323779660600] DEBUG - Butler: Starting delayed task ButlerTaskGenerateCreditsMarkers.
Mar 07, 2025 05:15:18.861 [138323712551736] DEBUG - PublicAddressManager: Obtaining public address and mapping port.
Mar 07, 2025 05:15:18.861 [138323712551736] DEBUG - PublicAddressManager: Obtaining public IP.
Mar 07, 2025 05:15:18.861 [138323712551736] DEBUG - [HCl#11be] HTTP requesting GET https://v4.plex.tv/pms/:/ip
Mar 07, 2025 05:15:19.378 [138323997764408] DEBUG - [HttpClient/HCl#11be] HTTP/1.1 (0.5s) 200 response from GET https://v4.plex.tv/pms/:/ip
Mar 07, 2025 05:15:19.378 [138323712551736] DEBUG - PublicAddressManager: Got public IP from v4.plex.tv: <redacted>
Mar 07, 2025 05:15:31.390 [138323712551736] DEBUG - NAT: UPnP, getPublicIP didn't find usable IGD.
Mar 07, 2025 05:15:31.641 [138323712551736] WARN - NAT: PMP, got an error: Not Supported by gateway.
Mar 07, 2025 05:15:31.641 [138323712551736] DEBUG - [HCl#11bf] HTTP requesting GET https://<redacted>.plex.direct:32400/identity
Mar 07, 2025 05:15:34.647 [138323997764408] DEBUG - [HttpClient/HCl#11bf] HTTP simulating 408 after curl timeout
Mar 07, 2025 05:15:34.648 [138323712551736] DEBUG - MyPlex: mapping state set to 'Mapped - Not Published'.
Mar 07, 2025 05:15:34.649 [138323712551736] DEBUG - MyPlex: Updating device connections (from timer: 0)
Mar 07, 2025 05:15:34.649 [138323712551736] DEBUG - [HCl#11c0] HTTP requesting PUT https://plex.tv/devices/d1f7f58bcaaccec0911ea2b9f47f719748f614e9?Connection[][uri]=http://<redacted>:32400&Connection[][uri]=http://172.21.0.4:32400&httpsEnabled=1&httpsRequired=0&dnsRebindingProtection=0&natLoopbackSupported=0&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
Mar 07, 2025 05:15:35.259 [138323997764408] DEBUG - [HttpClient/HCl#11c0] HTTP/1.1 (0.6s) 200 response from PUT https://plex.tv/devices/d1f7f58bcaaccec0911ea2b9f47f719748f614e9?Connection[][uri]=http://<redacted>:32400&Connection[][uri]=http://<redacted>:32400&httpsEnabled=1&httpsRequired=0&dnsRebindingProtection=0&natLoopbackSupported=0&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
Mar 07, 2025 05:18:27.431 [138323796437816] DEBUG - [Req#11730f/ViewStateSync] Starting
Mar 07, 2025 05:18:27.431 [138323796437816] DEBUG - [Req#11730f/ViewStateSync] Fetching user tokens
Mar 07, 2025 05:18:27.432 [138323796437816] DEBUG - [Req#11730f/ViewStateSync/HCl#11c1] HTTP requesting GET https://plex.tv/api/v2/server/users/services?auth_token=xxxxxxxxxxxxxxxxxxxx
Mar 07, 2025 05:18:28.118 [138323997764408] DEBUG - [HttpClient/HCl#11c1] HTTP/1.1 (0.7s) 200 response from GET https://plex.tv/api/v2/server/users/services?auth_token=xxxxxxxxxxxxxxxxxxxx
Mar 07, 2025 06:00:18.910 [138323779660600] DEBUG - Butler: we're outside the window, stopping.
Mar 07, 2025 06:15:17.520 [138323813215032] DEBUG - BPQ: garbageCollect - version - not forced - -1
Mar 07, 2025 06:15:17.520 [138323813215032] DEBUG - Versions: garbage collecting
Mar 07, 2025 06:15:17.573 [138323796437816] DEBUG - [CERT/OCSP/HCl#11c2] HTTP requesting GET http://r11.o.lencr.org/MFMwUTBPME0wSzAJBgUrDgMCGgUABBQaUrm0WeTDM5ghfoZtS72KO9ZnzgQUCLkRO6XQhRi06g%2BgrZ%2BGHo78OCcCEgPGN7QZDVSZahKu8XmELHD53g%3D%3D
Mar 07, 2025 06:15:17.832 [138323997764408] DEBUG - [HttpClient/HCl#11c2] HTTP/1.1 (0.3s) 200 response from GET http://r11.o.lencr.org/MFMwUTBPME0wSzAJBgUrDgMCGgUABBQaUrm0WeTDM5ghfoZtS72KO9ZnzgQUCLkRO6XQhRi06g%2BgrZ%2BGHo78OCcCEgPGN7QZDVSZahKu8XmELHD53g%3D%3D
Mar 07, 2025 06:15:17.832 [138323796437816] INFO - [CERT/OCSP] Successfully retrieved response.
Mar 07, 2025 06:15:18.520 [138323813215032] DEBUG - 6 threads are waiting on db connections held by threads: 138323716746040,138323788049208,138323788049208,138323788049208,138323788049208,138323788049208,138323788049208,138323788049208,138323788049208,138323788049208,138323788049208,138323788049208,138323788049208,138323788049208,138323788049208,138323788049208,138323788049208,138323788049208,138323788049208,138323788049208
Mar 07, 2025 06:15:18.694 [138323800632120] DEBUG - [HCl#11c3] HTTP requesting GET https://plex.tv/api/v2/user?includeSubscriptions=1&includeProviders=1
Mar 07, 2025 06:15:18.931 [138323712551736] DEBUG - PublicAddressManager: Obtaining public address and mapping port.
Mar 07, 2025 06:15:18.931 [138323712551736] DEBUG - PublicAddressManager: Obtaining public IP.
Mar 07, 2025 06:15:18.931 [138323712551736] DEBUG - [HCl#11c4] HTTP requesting GET https://v4.plex.tv/pms/:/ip
Mar 07, 2025 06:15:19.195 [138323779660600] DEBUG - [HCl#11c5] HTTP requesting GET https://plex.tv/api/taas/profile
Mar 07, 2025 06:15:19.279 [138323997764408] DEBUG - [HttpClient/HCl#11c3] HTTP/1.1 (0.6s) 200 response from GET https://plex.tv/api/v2/user?includeSubscriptions=1&includeProviders=1

Server log excerpts are near useless, Please see the server log article for gathering the needed zip file and then upload it here.

Alright, here are the full server logs of the most recent crash. My health tracker said it died at 5:03 this morning.

Plex Media Server Logs_2025-03-09_08-10-37.zip (6.2 MB)

Looking at the logs nothing jumps out, other than I am seeing activity up till about 0809 when you rebooted the server…

Unfortunately between 0503 and 0809 the server was inaccessible both locally and remotely. What meaningful activity do you see after 0503? I just see a couple of IP pings at 0556, 0656 and 0756.

Ok looks like you are using a beta image too, unless you know what you are doing I would avoid beta builds they tend to have bugs (not sure its related to this yet)

Mar 09, 2025 05:13:42.602 [123788362525496] DEBUG - [Req#11082a/ViewStateSync] Starting
Mar 09, 2025 05:51:11.996 [123788261862200] DEBUG - Butler: Starting delayed task RefreshPeriodicMetadata.
Mar 09, 2025 06:01:12.019 [123788261862200] DEBUG - Butler: we're outside the window, stopping.

Those all indicate active plex tasks. I didnt scour the entire log for everything it was doing.

I think you may have some networking issues. MyPlex: mapping state set to 'Mapped - Not Published'.

My other thought is to check http://<IP_OF_PMS>:32400/identity and my last thought is to check to see if the old connection deadlock is back. The URL for that check is: http://127.0.0.1:32400/connections?X-Plex-Token=#############

Thank you for your time and help here!

  • Yes, I am using the plexpass Docker image. I haven’t had any issues with it for 7-8 years, but I also don’t mind moving away from this. I also don’t mind being on a beta build; I’m a veteran software engineer so I’m used to stuff being broken at times. I’d rather try to diagnose the issue while it is reproducible than just back down and go to latest.
  • I have no symptoms of networking issues; users are able to access my server remotely and either Direct Play or transcode media. What might be a symptom that I should look for?

Here are responses for the identity and connections checks, made while the server is operating properly. If it crashes again tonight I will attempt to gather these once more.

identity: <MediaContainer size="0" apiVersion="0.2.0" claimed="1" machineIdentifier="d1f7f58bcaaccec0911ea2b9f47f719748f614e9" version="1.41.5.9522-a96edc606"> </MediaContainer>

connections: connections.txt (8.7 KB)

I do note that the server has crashed/hung at almost the exact same time (5:04 am) every day for the last 4 days. I had made no appreciable changes to my server at that date. I recognise that 1.41.5.9522 was released 13 days ago, but I pull latest images nightly so I updated to it then.

Crashed again at 5:03am this morning. connections and identity endpoints were inaccessible. Couldn’t think what other useful info could be captured, but here is ps aux output from inside the container.

USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.0  0.0    204     0 ?        Ss   Mar09   0:00 s6-svscan -t0 /var/run/s6/services
root          38  0.0  0.0    204     0 ?        S    Mar09   0:00 s6-supervise s6-fdholderd
root         275  0.0  0.0    204     0 ?        S    Mar09   0:00 s6-supervise plex
plex         278  6.1  0.3 286740 125864 ?       Ssl  Mar09  83:48 /usr/lib/plexmediaserver/Plex Media Server
plex         327  0.0  0.0  65908 22160 ?        SNl  Mar09   0:33 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-a96edc606/Fr
plex         367  0.0  0.0  42884  3072 ?        Sl   Mar09   0:41 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Priva
plex         395  0.3  0.1  92144 51460 ?        Sl   Mar09   5:20 Plex Plug-in [com.plexapp.plugins.trakttv] /usr/lib/plexmediaserver/Resources/Plug-ins-a96
plex         397  0.0  0.0  69388  4120 ?        Sl   Mar09   0:29 Plex Plug-in [com.plexapp.plugins.WebTools] /usr/lib/plexmediaserver/Resources/Plug-ins-a9
plex        2116  3.9  0.0   2624  1604 ?        S    Mar09  52:47 Plex EAE Service
plex      152838  0.0  0.0  54204 24308 ?        Sl   05:00   0:05 /usr/lib/plexmediaserver/Plex Transcoder -codec:1 eac3_eae -eae_prefix:1 085cf7aa-e978-45a
root      160633  0.0  0.0   2616  1408 ?        S    06:42   0:00 /bin/sh -e /healthcheck.sh
root      160634  0.0  0.0  97376 11008 ?        S    06:42   0:00 curl --connect-timeout 15 --max-time 100 --silent --show-error --fail http://localhost:324
root      160636  1.0  0.0   5868  3456 pts/0    Ss   06:42   0:00 /bin/bash
root      160643  0.0  0.0   7656  3072 pts/0    R+   06:42   0:00 ps aux

And for posterity, more logs.

Plex Media Server Logs_2025-03-10_06-46-30.zip (6.0 MB)

I diffed my server config from before it started crashing to after (I have a full restic backup of everything relevant), and saw no appreciable changes. I had made some changes to configurations of unrelated containers but nothing even adjacent to Plex.

Finally, I am actually going to switch away from the plexpass image for now, to regain stability on my server. I think I have gathered enough information to try and diagnose the problem and find solutions. Is there an official manner to submit a bug report to Plex for diagnosis?

@ChuckPa anything else that @bothari can provide to get a bug filed?

Question:

What is commanding PMS to shutdown ?

Mar 10, 2025 06:43:15.985 [140695123798840] DEBUG - Shutting down with signal 15 (Terminated)
Mar 10, 2025 06:43:15.985 [140695123798840] DEBUG - Ordered to stop server.
.
.
Mar 10, 2025 06:43:17.665 [140694857460536] DEBUG - TranscodeJobManager: [Running] onServerShutdown
Mar 10, 2025 06:43:17.665 [140694857460536] DEBUG - TranscodeJobManager: [Running] -> [Shutdown]
Mar 10, 2025 06:43:17.665 [140694916180792] DEBUG - MetadataItemClusterRequestHandler: a shutdown event has been received
Mar 10, 2025 06:43:17.684 [140694941346616] DEBUG - [Req#13288a] Play progress on 121024 '4:00 P.M.' - got played 2178000 ms by account 11911884!
Mar 10, 2025 06:43:17.684 [140694882626360] DEBUG - The butler performed deep analysis on 0 files
Mar 10, 2025 06:43:17.685 [140694882626360] DEBUG - The butler generated 26 season intro markers

That is me manually issuing a docker stop.

Welp, it just crashed last night using the :latest tagged Docker image as well.

Plex Media Server Logs_2025-03-11_10-42-36.zip (5.1 MB)

I just diffed my entire server config from a week before it started crashing and there are really minimal changes. For context, everything goes through Docker on my machine, it is an otherwise stock ubuntu 24 install.

  • Modified my homepage configuration to operate on a different network (onto host network away from a docker network).
  • Changed my uptime-kuma configuration to be a custom build with some PRs instead of the stock image off dockerhub.
  • Changed homepage config to add health check statuses for various containers including Plex.
  • Changed uptime-kuma configuration to check docker container health instead of arbitrary API endpoints.
  • Added custom healthchecks to various docker containers in the docker-compose file (not Plex).

And that’s it!

I may try reverting the “scariest” sounding parts of that - probably the healthchecks in docker-compose - and see if that cleans things up.

Crashed again at 5:03am last night, although it was resurrected almost immediately by an autoheal image I spun up. Tonight I am going to stop every other container on my Docker stack to see if that helps at all.

Well I guess I’ll keep posting my diagnostic steps for posterity.

Last night I turned off every other container besides Plex and my autoheal script. For the first time in almost two weeks Plex did not crash at 5:03am.

I’m now guessing that it is probably the periodic healthcheck triggered either by uptimekuma or homepage.

Tonight I will be leaving the majority of my containers running, and just stopping any which I suspect may be causing the issue.

Thanks for the update, your logs didnt show anything obvious which would cause the crash, if it is caused by an outside tool that might explain why the logs dont have useful data.

Another night with no crashing, which is exciting. I have re-enabled three more docker services to test with this night; Kometa, ImageMaid, and a custom image of mine which interacts with Kometa. The only slight interaction here is that ImageMaid actually runs at 5am every night, just a couple of minutes before Plex has been crashing. I don’t believe this was actually the source of the crash though, but perhaps we will see otherwise tonight.

All my containers are now active, except for Uptime Kuma which performs healthchecks on my containers and reports on failures via Pushover. I am activating that container tonight, and HOPING it will crash, proving that Uptime Kuma was causing the Plex container to crash.

I do not think that this EXPLAINS the crash however; all that Uptime Kuma does is send a healthcheck request to Plex every 60 seconds.

WELP. Last night everything was running exactly the same as it was when things were crashing, and no crash. I actually halted updates of Docker images etc., made no changes to configs, nothing.

How infuriating. Effectively archiving this thread, hoping this will not come back again.