@ShortBusHero said:
Hello all,
I am hoping you may be able to help me figure out what is going on with my Plex Server. For whatever reason the server is crashing after a few days of running without any issues. I noticed in the logs I am receiving the below error, or similar, quite a bit in the 10 minutes prior to the Plex crashing. It doesn’t make much sense to me what is going on. Crashes similar to this have happened multiple times now within the past week or so. The server will run fine for a few days before receiving a notification from PlexPy the media server is down.
ERROR - Couldn’t add a new thread to the pool of size 1: boost::thread_resource_error: An attempt was made to load a program with an incorrect format
When I have searched for this error related to Plex, I am finding some threads which seem to indicate syncing a large library may be an issue, however I don’t have any sort syncing at all with this server. In fact, lately I haven’t had much time to watch a whole lot of content from the server at all. This issue is occurring while nothing is even playing from the server.
I have attached my logs if they might be useful. Any assistance is appreciated!
Sorry - this did not get picked up. Is this still happening ?
This normally arises when the process runs out of memory - which was the old issue with syncing large libraries that you found - sync had since be re-written and that no longer arises
There is nothing in the log to show any activity that would have used up loads of memory.
Such problems are not easy to troubleshoot and need to confirm if it is memory shortage and try and see when a sudden jump in memory usage arose - perhaps a memory leak bug. Perhaps a system issue affecting Plex Media Server process
There is a setting we can add that increases the number of log files retained - normally only 6 log files of each type. Increasing the number coupled with monitoring memory usage and identifying when memory use shot up may help get close to the cause.
There are tools such as SystemInternals VMMap that help track memory usage for a process
See VMMap - Sysinternals | Microsoft Learn
The log you attached shows it started at 16:36:51 on 19th July. Any abnormal log entries in the Windows System and Application logs around that time? Were there other programs affected?
To increase the number of log files from the default of 6, you can add the following Registry entry using RegEdit
Navigate to HKEY_CURRENT_USER\Software\Plex, Inc.\Plex Media Server
and right click on Plex Media Server
and select New
and within the New options, select DWORD (32-bit) Value
and create item named LogNumFiles
. Give it a value of 40 (decimal) and you can see if that would cover the number of days from launch until the error starts to appear. To revert back, just delete the key
When the problem arises after a re-launch, then take a copy of all the contents of the Logs
folder and zip that together with any info you established from memory use monitoring tools such as VMMap
It might be an idea to get a view of the various threads when the issue arises. In a browser, enter url
http://localhost:32400/connections?X-Plex-Token=xxxxxxxxxxxxxxxxxx
The token you need to have ready and you can find out the server token from either following steps here
https://support.plex.tv/hc/en-us/articles/204059436-Finding-an-authentication-token-X-Plex-Token or from the registry key PlexOnlineToken
- in same area you added the LogNumFiles