Win10 Plex server crashing every few days from memory growth

Thank you @COXIE2015

Thanks @sa2000 . I calmed down after that post and haven’t fallen back yet. And it hasn’t crashed yet. I’m currently recording more stuff than I really want or need. I’m sort of testing the capacity in a few ways. So perhaps that’s part of the issue. My setting is to send crash reports to plex. But if it just halted perhaps there might not be a crash report. The first time I noticed that plex server wasn’t running, I noticed that there were a large number of transcode processes in the process list, much more than normal, in the 10-15 range. Anyway, here are the requested files. Thanks.

Oh, I should add… This might be a coincidence, but it was not long after the other issues. My plex player software on my Fire TV v2 also started crashing last night. It was a weird failure I’d never experienced before. The icon for Plex had a line on the bottom that was actively changing sort of like a progress bar. I couldn’t figure it out but after a few attempts I was able to uninstall it and reinstall successfully. * Update - I suspect that there was a Plex client update bring pushed causing this. If just never seen it before and there was no notice.

Plex temp files.zip (84.2 KB)
Plex Media Server Logs_2022-03-11_10-53-34.zip (1.4 MB)

I noticed around 5pm mt that Plex wasn’t running again and decided to fall back to the previous version for now…

I’m having this same issue. was there a resolution for this error?

ERROR - Thread: Couldn’t add a new thread to the pool of size 9: boost::thread_resource_error: Resource temporarily unavailable

I’m getting that error regularly and in bunches right before failure

the only other errors I have in the file which may or may not be related are
ERROR - Format [JPEG] - Insufficient memory (case 4)
ERROR - Error resizing an image, we don’t trust what we cached [C:\Users\cordodor\AppData\Local\Plex Media Server\Cache\PhotoTranscoder\14\14b778a074226507db2f789f87039b7c48fd7dd1.jpg]

This error gets logged when we run out of memory
There are different causes for memory to be exhausted and each one needs to be investigated to find the reason

Would need logs to investigate - with LogMemoryUse preference added where avaulable and debug logging in place and logs zip

Advanced, Hidden Server Settings | Plex Support

Thanks for the assist. I’ve been a PMS user since 2016 and this error did not occur until I migrated to new hardware in February. I’d successfully restored my instance previously following a Windows reinstall on that previous hardware and this migration appeared to go just as smoothly. I did have some issues around all the software ASUS wanted me to install associated with the new motherboard and as of this morning I’ve reinstalled Win11Pro and set it up with basic drivers rather than the full ASUS suite install. I then restored my backup from my PMS migration from the old hardware so as not to reimport bad settings and am hoping this goes better. The only settings changes i’ve made are to enable hardware acceleration and disable local media from the new agent. If it bites me again, i’ll report back and explore the memory logging.

It looks like this is the same issue I’m having, I’ve had Plex crashing on multiple occasions for the past ~2-3 months.

I just rebuilt it in a new VM yesterday and the issue didn’t go away. found the thread_resource_error in the logs and ended up here.

Did anyone find a useful resolution/band-aid in the meantime to keep things from crashing?

I have an open issue with the development team for memory spikes and failures during scheduled tasks when doing TV Show Episodes Intro Detection

All I can suggest is running the server with memory logging enabled and get server logs captured after the issue arises

See LogMemoryUse internal setting outlined here Advanced, Hidden Server Settings | Plex Support

Hi all, firstly apologies for bumping a 2 month old thread, but there is useful information in this thread and I wanted to add to it.
I am also having this issue in PMS.

PMS itself does not crash but I guess it becomes thread-locked as it no longer responds to any commands, also it cannot even draw the right click menu correctly which is really weird when it’s finally ran out of memory…

The last thing the Console logged to me before no longer being able to send me information was: HttpServer: got exception from I/O context: bad allocation

image

I have enabled the LogMemoryUse advanced parameter and will upload logs when I have something to show.

I am also using an Intel NUC for Transcoding, Should I see if this error goes away if I were to disable transcoding?

I also noticed that PMS will outright stop generating Posters for TV Shows and Movies while it is starting to get into this out of memory state.

Anything you need from me please ask, more than happy to help where possible.

You may need to also increase the number of log files - see LogNumFiles
Advanced, Hidden Server Settings | Plex Support

1 Like

Hi, This has happened again.
What would you want from me, all of the log files zipped or put someplace?

I wasn’t sure if server logs contained anything private, so I didn’t want to upload them right away without confirming first.

Let me know :slight_smile:

With LogMemoryUse set to 1 and LogNumFiles set to give more log files - eg value of 20 - I need zip of the log files obtained after the crash - you can attach the zipped log file here - if too big because of the increased number of log files - then please upload to dropbox or onedrive or google drive etc and share a link here

Logs - 2022-06-16.zip (5.3 MB)

There ya go bud - happy bug hunting.

Thanks for the logs - I cannot see LogMemoryUse being set and in use
See Advanced, Hidden Server Settings | Plex Support

The issues arose whilst Overseerr was trawling through the libraries and we had difficulties allocating memory

Problem started at this point

Jun 15, 2022 20:00:08.647 [4952] DEBUG - Request: [172.16.0.110:52506 (Allowed Network (Subnet))] GET /library/metadata/7779?includeChildren=1 (55 live) GZIP Signed-in Token (AlienXAXS) (Chrome (Overseerr))
Jun 15, 2022 20:00:08.647 [1676] DEBUG - Request: [172.16.0.110:52504 (Allowed Network (Subnet))] GET /library/metadata/7051?includeChildren=1 (56 live) GZIP Signed-in Token (AlienXAXS) (Chrome (Overseerr))
Jun 15, 2022 20:00:08.649 [8292] ERROR - Thread: Couldn't add a new thread to the pool of size 29: boost::thread_resource_error: Resource temporarily unavailable
Jun 15, 2022 20:00:08.649 [8296] ERROR - Thread: Couldn't add a new thread to the pool of size 29: boost::thread_resource_error: Resource temporarily unavailable
Jun 15, 2022 20:00:08.649 [8292] ERROR - Thread: Couldn't add a new thread to the pool of size 29: boost::thread_resource_error: Resource temporarily unavailable
Jun 15, 2022 20:00:08.649 [8296] ERROR - Thread: Couldn't add a new thread to the pool of size 29: boost::thread_resource_error: Resource temporarily unavailable
Jun 15, 2022 20:00:08.649 [3572] DEBUG - Request: [172.16.0.110:52510 (Allowed Network (Subnet))] GET /library/metadata/231?includeChildren=1 (56 live) GZIP Signed-in Token (AlienXAXS) (Chrome (Overseerr))
Jun 15, 2022 20:00:08.649 [8292] ERROR - Thread: Couldn't add a new thread to the pool of size 29: boost::thread_resource_error: Resource temporarily unavailable
Jun 15, 2022 20:00:08.650 [8296] ERROR - Thread: Couldn't add a new thread to the pool of size 29: boost::thread_resource_error: Resource temporarily unavailable
Jun 15, 2022 20:00:08.650 [8292] ERROR - Thread: Couldn't add a new thread to the pool of size 29: boost::thread_resource_error: Resource temporarily unavailable
Jun 15, 2022 20:00:08.650 [8296] ERROR - Thread: Couldn't add a new thread to the pool of size 29: boost::thread_resource_error: Resource temporarily unavailable

We need to establish if there is a memory leak or very large amounts of data requested
So would need logs as you have provided but with the setting for logging memory usage - Please ensure server is restarted after the registry edit is made to add the LogMemoryUse preference

Type is DWORD (32-bit) Value and value 1

I will also need a download of the Plex Media Server database which you can send me by Private Message - Plex Web / Troubleshooting / Download database - if too big to attach please upload somewhere and send me a link

Hi Sa2000.
Thanks for your response.

Apologies about the LogMemoryUse, seems I had a typo in the reg key name and I can now see it’s logging memory usage as expected.

The issue only arises every few days, I will upload the db and new logs when the issue happens again for you inspection.

Cheers,
AlienX :slight_smile:

Thanks - ideally I want logs with memory usage going back to time when PMS is launched up to time of failure - see if you need to increase log numbers further - last set of logs problem arose within only 4 or so log files from launch

Hi @AlienXAXS

Have you managed to capture the event? I was having the same issue and had to disable hardware encoding to avoid it happening all the time. Would love for a fix to be found!

Hi @peedub
Apologies but after collecting initial logs I got a bit sick and tired with it breaking every 2-3 hours and moved my Plex server to Ubuntu, still using Intel QuickSync but it “just works”.

Just watched my server crash in real-time via Papertrail and ProcMon.

“ERROR - Thread: Couldn’t add a new thread to the pool of size 9: boost::thread_resource_error: Resource temporarily unavailable”

“DEBUG - CERT: incomplete TLS handshake from [xxx.xxx.xxx.223]:55688: malloc failure”

I think the sequence of events that triggered it for me was refreshing the metadata for my TV shows library and then emptying the trash. Once I emptied the trash all Hades broke loose with the thread errors.

btw, did anybody know that suddenly laughing while watching streaming log files confuses teenagers? lol

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