Lockup with CPU at 100%, every few days, needs restart to recover

Server Version#: v1.31.1.6733-bc0674160

Every few days, my server locks up. The specific symptoms are:

  • clients can’t connect to the server
  • the “Plex Media Server” process is at 100% CPU usage continuously
  • it stays in this state for 30+ minutes
  • a restart of the server application fixes it. Sometimes, it recovers on its own, though I’m not sure if the process crashes / restarts itself in those cases or if it just recovers without a restart

It seems like it might be correlated with some clients and some specific media, but I haven’t been able to narrow it down. In the attached log, the problem starts sometime between 21:29 and 21:39
Plex Media Server Logs_2023-03-03_22-13-26.zip (4.3 MB) . Any thoughts on how to troubleshoot this further?

In this log, the problem starts between 23:31 and 23:41. It resolves itself (with no action on my part) sometime between 23:41 and 23:48.
Plex Media Server Logs_2023-03-03_23-47-50.zip (3.9 MB)

Sounds like it might be the scheduled server maintenance tasks.
If you only give it 30 minutes to run those, they’ll pile up and your server will be super busy during that time.

Check Settings > [Server Name] > Scheduled Tasks

1 Like

Thanks for the idea, but I have the scheduled tasks set for 2 AM - 6 AM, so that doesn’t line up with my log files that show timestamps of 9pm and 11pm (unless that setting does something weird like use UTC instead of the machine’s time)

sounds similar to my issue → PLEX movie issue - CPU death spiral

So far it seems it happens when certain movies are trying to be played, or more precisely when the metadata is accessed on these “bad” movies (playback will call the metadata endpoint before playback) There is virtually nothing in the logs on this, it just consumes all the CPU and leaves the server unresponsive. Your issue could be different, but if you have remote users their persistence on trying to play a certain title could bring down your server. Refreshing the metadata on the entry seems to resolve it, but its very difficult to identify with nothing to go by in the logs.

hey @jseeley, I appreciate the pointer to that thread, it does seem like very similar symptoms.

I’m not 100% confident because I can’t find a movie to reproduce it myself (I tried on a newly added movie, as suggested in that thread, but it didn’t repro). Maybe I can more clearly describe the problem to my remote users now though, to get them to tell me when they find a movie that triggers it.

Yeah, it doesn’t necessarily have to be a newly added movie. The experience would be that the movie simply doesn’t play, but each time they retry it, it consumes more cpu until the server is non-responsive.

Makes sense, that definitely sounds like a sequence of events I’m seeing.

The experience would be that the movie simply doesn’t play

When this happens, is there a particular error message that consistently shows up for the user? I see some mention of “could not create play queue” in the other thread, is that always the message?

I think the playback behavior depends on the client being used. On iOS it seems to be something about unable to add to the play queue. On web it seems to hang forever. On roku i think it says inaccessible.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.