OutOfMemory Error

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
boss
Posts: 418
Joined: Thu Jun 30, 2016 1:07 pm

Re: OutOfMemory Error

Post by boss »

@mik_s
I spoke too soon again.
Just now the OutOfMemory issue happened again.
Attached is the log file with log level set to ALL.
Cheers
Attachments
debug.log.zip
(1.46 MiB) Downloaded 6 times
User avatar
mik_s
Moderator
Posts: 1484
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: OutOfMemory Error

Post by mik_s »

Damn I thought we had figured this out and just made an issue for it.
At least there is not mention of those libraries so it confirms that was one problem.

This appears to happen on svc/upnp-org/ContentDirectory/action events as several ids comes up with this error when browsing a folder.

Code: Select all

TRACE 2025-07-12 13:03:37.469 [jupnp-stream-server-74] HttpServlet HttpServlet.service(): id:  90, request URI: /dev/27b1ad66-cfee-4ace-8223-b1f142a4abcd/svc/upnp-org/ContentDirectory/action
TRACE 2025-07-12 13:03:37.469 [jupnp-stream-server-74] Handling Servlet request asynchronously: ServletApiRequest@12fd7eb{ServletContextRequest@8cabf1{POST@80929 http://192.168.0.2:5001/dev/27b1ad66-cfee-4ace-8223-b1f142a4abcd/svc/upnp-org/ContentDirectory/action HTTP/1.1}}
WARN  2025-07-12 13:03:37.469 [jupnp-stream-server-74] /dev/27b1ad66-cfee-4ace-8223-b1f142a4abcd/svc/upnp-org/ContentDirectory/action
java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
	at java.base/java.lang.Thread.start0(Native Method)
	at java.base/java.lang.Thread.start(Thread.java:809)
	at java.base/java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:945)
	at java.base/java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1364)
	at org.jupnp.transport.RouterImpl.received(RouterImpl.java:284)
	at net.pms.network.mediaserver.jupnp.transport.async.JakartaAsyncServlet.service(JakartaAsyncServlet.java:67)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614)
	at org.eclipse.jetty.ee10.servlet.ServletHolder.handle(ServletHolder.java:736)
	at org.eclipse.jetty.ee10.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1619)
	at org.eclipse.jetty.ee10.servlet.ServletHandler$MappedServlet.handle(ServletHandler.java:1552)
	at org.eclipse.jetty.ee10.servlet.ServletChannel.dispatch(ServletChannel.java:819)
	at org.eclipse.jetty.ee10.servlet.ServletChannel.handle(ServletChannel.java:436)
	at org.eclipse.jetty.ee10.servlet.ServletHandler.handle(ServletHandler.java:469)
	at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1060)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:151)
	at org.eclipse.jetty.server.Server.handle(Server.java:182)
	at org.eclipse.jetty.server.internal.HttpChannelState$HandlerInvoker.run(HttpChannelState.java:662)
	at org.eclipse.jetty.server.internal.HttpConnection.onFillable(HttpConnection.java:418)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:322)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:99)
	at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:480)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:443)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:293)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:201)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:311)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:979)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1209)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1164)
	at java.base/java.lang.Thread.run(Thread.java:840)
TRACE 2025-07-12 13:03:37.470 [jupnp-stream-server-74] Stream Async Error, id: 90, uri: /dev/27b1ad66-cfee-4ace-8223-b1f142a4abcd/svc/upnp-org/ContentDirectory/action, duration: 1 ms
TRACE 2025-07-12 13:03:37.470 [jupnp-stream-server-74] Asynchronous processing of HTTP request error
java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
	at java.base/java.lang.Thread.start0(Native Method)
	at java.base/java.lang.Thread.start(Thread.java:809)
	at java.base/java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:945)
	at java.base/java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1364)
	at org.jupnp.transport.RouterImpl.received(RouterImpl.java:284)
	at net.pms.network.mediaserver.jupnp.transport.async.JakartaAsyncServlet.service(JakartaAsyncServlet.java:67)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614)
	at org.eclipse.jetty.ee10.servlet.ServletHolder.handle(ServletHolder.java:736)
	at org.eclipse.jetty.ee10.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1619)
	at org.eclipse.jetty.ee10.servlet.ServletHandler$MappedServlet.handle(ServletHandler.java:1552)
	at org.eclipse.jetty.ee10.servlet.ServletChannel.dispatch(ServletChannel.java:819)
	at org.eclipse.jetty.ee10.servlet.ServletChannel.handle(ServletChannel.java:436)
	at org.eclipse.jetty.ee10.servlet.ServletHandler.handle(ServletHandler.java:469)
	at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1060)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:151)
	at org.eclipse.jetty.server.Server.handle(Server.java:182)
	at org.eclipse.jetty.server.internal.HttpChannelState$HandlerInvoker.run(HttpChannelState.java:662)
	at org.eclipse.jetty.server.internal.HttpConnection.onFillable(HttpConnection.java:418)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:322)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:99)
	at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:480)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:443)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:293)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:201)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:311)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:979)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1209)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1164)
	at java.base/java.lang.Thread.run(Thread.java:840)
TRACE 2025-07-12 13:03:37.474 [jupnp-stream-server-74] Stream Async Complete, id: 90, uri: /dev/27b1ad66-cfee-4ace-8223-b1f142a4abcd/svc/upnp-org/ContentDirectory/action, duration: 5 ms
TRACE 2025-07-12 13:03:37.474 [jupnp-stream-server-74] Completed asynchronous processing of HTTP request: ServletApiRequest@12fd7eb{ServletContextRequest@8cabf1{POST@80929 http://192.168.0.2:5001/dev/27b1ad66-cfee-4ace-8223-b1f142a4abcd/svc/upnp-org/ContentDirectory/action HTTP/1.1}}
This is definitely something for the Devs to troubleshoot as I have no idea. I'll update the issue to add this too.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
boss
Posts: 418
Joined: Thu Jun 30, 2016 1:07 pm

Re: OutOfMemory Error

Post by boss »

@mik_s
I am wondering if there was no mention of those libraries because it was set to ALL and not TRACE as previously.
Out of interest, I might set the log level to TRACE and get a log of that when it next gets the error.
User avatar
mik_s
Moderator
Posts: 1484
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: OutOfMemory Error

Post by mik_s »

The logs were in trace mode.

That "All" option only applies to the media server log level which is a separate thing.
This normally suppresses logspam from the networking library, I think.
I know this option was added not that long ago and remember some discussion about reducing logspam.

In your previous logs it was logged as an ERROR or WARN so would show no matter what the log level was.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
Post Reply