FAQ  •  Register  •  Login

Out of memory exceptions

<<

lebdron

Serviio newbie

Posts: 1

Joined: Sat Jan 07, 2023 11:39 pm

Post Sat Jan 07, 2023 11:49 pm

Out of memory exceptions

Hello. Recently I started getting the following messages in the log, presumably leading to a system hang:
  Code:
Jan  5 02:22:30 raspberrypi serviio.sh[162193]: [2426886.643s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 2048k, guardsize: 0k, detached.
Jan  5 02:22:30 raspberrypi serviio.sh[162193]: [2426886.739s][warning][os,thread] Failed to start the native thread for java.lang.Thread "ServioThread-73951-DiscoveryNotifier"
Jan  5 02:22:30 raspberrypi kernel: [2456326.637800] cgroup: fork rejected by pids controller in /system.slice/serviio.service
Jan  5 02:22:30 raspberrypi serviio.sh[162193]: Exception in thread "ServioThread-72352-DiscoverySSDPMessageListener" java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
Jan  5 02:22:30 raspberrypi serviio.sh[162193]: #011at java.base/java.lang.Thread.start0(Native Method)
Jan  5 02:22:30 raspberrypi serviio.sh[162193]: #011at java.base/java.lang.Thread.start(Thread.java:798)
Jan  5 02:22:30 raspberrypi serviio.sh[162193]: #011at org.serviio.upnp.discovery.DiscoveryManager.deviceAvailable(DiscoveryManager.java:134)
Jan  5 02:22:30 raspberrypi serviio.sh[162193]: #011at org.serviio.upnp.discovery.DiscoveryManager.restartDiscoveryEngine(DiscoveryManager.java:109)
Jan  5 02:22:30 raspberrypi serviio.sh[162193]: #011at org.serviio.upnp.discovery.Multicaster.getBoundNIC(Multicaster.java:46)
Jan  5 02:22:30 raspberrypi serviio.sh[162193]: #011at org.serviio.upnp.discovery.DiscoverySSDPMessageListener.run(DiscoverySSDPMessageListener.java:81)
Jan  5 02:22:30 raspberrypi serviio.sh[162193]: #011at java.base/java.lang.Thread.run(Thread.java:829)
Jan  5 02:23:55 raspberrypi serviio.sh[162193]: [2426971.829s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 2048k, guardsize: 0k, detached.
Jan  5 02:23:55 raspberrypi serviio.sh[162193]: [2426971.833s][warning][os,thread] Failed to start the native thread for java.lang.Thread "ServioThread-73955-DiscoveryNotifier"
Jan  5 02:23:55 raspberrypi serviio.sh[162193]: Exception in thread "ServioThread-73948-DiscoverySSDPMessageListener" java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
Jan  5 02:23:55 raspberrypi serviio.sh[162193]: #011at java.base/java.lang.Thread.start0(Native Method)
Jan  5 02:23:55 raspberrypi serviio.sh[162193]: #011at java.base/java.lang.Thread.start(Thread.java:798)
Jan  5 02:23:55 raspberrypi serviio.sh[162193]: #011at org.serviio.upnp.discovery.DiscoveryManager.deviceAvailable(DiscoveryManager.java:134)
Jan  5 02:23:55 raspberrypi serviio.sh[162193]: #011at org.serviio.upnp.discovery.DiscoveryManager.restartDiscoveryEngine(DiscoveryManager.java:109)
Jan  5 02:23:55 raspberrypi serviio.sh[162193]: #011at org.serviio.upnp.discovery.Multicaster.getBoundNIC(Multicaster.java:46)
Jan  5 02:23:55 raspberrypi serviio.sh[162193]: #011at org.serviio.upnp.discovery.DiscoverySSDPMessageListener.run(DiscoverySSDPMessageListener.java:81)
Jan  5 02:23:55 raspberrypi serviio.sh[162193]: #011at java.base/java.lang.Thread.run(Thread.java:829)

Is there anything I can do with it? Thank you.
<<

atc98092

User avatar

DLNA master

Posts: 5212

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Sun Jan 08, 2023 3:32 am

Re: Out of memory exceptions

You can increase the memory assigned to Java in the VMOptions file. I can't say where that file is located on your install, since you're not using Windows. Unfortunately, I can't recall the format of the command to add to the line. I thought I had it in my folder, but I just checked and it's not there.

Wait, I think I found it. Add -Xmx512m to the file I mentioned above. If 512m isn't enough, bump it to 1024m and try again. Make sure you restart the Serviio service after you make the change.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

cmakula

Streaming enthusiast

Posts: 30

Joined: Tue Oct 29, 2019 9:04 pm

Location: Chicago, Illinois, USA

Post Sun Jan 08, 2023 6:28 pm

Re: Out of memory exceptions

The JVM options are located at the end of the serviio.sh file in the bin directory of the Linux/RasPi install. You can set the -Xmx512M options there.

Good Luck
:ugeek:
Serviio Server - Dell PowerEdge R420, Dual Xeon E5-2420, 4x120 GB SSD RAID 0, 64 GB RAM (Serviio running from RAMdisk), 4 NICs (aggregated to LAN), 10Gbe to NAS, Ubuntu 22.04.1 Minimal
NFS File Server - Synology DS1517+, 20TB disk space (5x4TB), 4 NICs (aggregated to LAN), 10Gbe to Serviio Server

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 45 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.