Page 1 of 1

Serviio stoped working MediaServer error

PostPosted: Thu Sep 19, 2019 12:28 pm
by leandrotsampa
Hi, when I start serviio after a while he stops.
Below is the info about error.

  Code:
2019-09-19 08:51:42,758 INFO  [MediaServer] ------------------------------------------------------------------------
2019-09-19 08:51:42,759 INFO  [MediaServer] Serviio DLNA media streaming server v 2.0 (rev. 2dd498f22a77)
2019-09-19 08:51:42,759 INFO  [MediaServer] Petr Nejedly 2009-2018
2019-09-19 08:51:42,759 INFO  [MediaServer] http://www.serviio.org
2019-09-19 08:51:42,759 INFO  [MediaServer]
2019-09-19 08:51:42,759 INFO  [MediaServer] Java 11.0.4-Debian amd64
2019-09-19 08:51:42,759 INFO  [MediaServer] OS Linux 4.19.0-5-amd64
2019-09-19 08:51:42,759 INFO  [MediaServer] File encoding: UTF-8
2019-09-19 08:51:42,760 INFO  [MediaServer] Headless mode enabled: true
2019-09-19 08:51:42,760 INFO  [MediaServer] User: root
2019-09-19 08:51:42,760 INFO  [MediaServer] User home dir: /root
2019-09-19 08:51:42,761 INFO  [MediaServer] Temp dir: /tmp
2019-09-19 08:51:42,761 INFO  [MediaServer] ------------------------------------------------------------------------
2019-09-19 08:51:42,782 DEBUG [MediaServer] Runtime params: --add-modules=jdk.unsupported, -Xmx2048m, -Xms1024m, -XX:+UseG1GC, -XX:GCTimeRatio=1, -XX:MinHeapFreeRatio=10, -XX:MaxHeapFreeRatio=20, -Djava.net.preferIPv4Stack=true, -Djava.awt.headless=true, -Dorg.restlet.engine.loggerFacadeClass=org.restlet.ext.slf4j.Slf4jLoggerFacade, -Dderby.system.home=/usr/local/serviio/library, -Dserviio.home=/usr/local/serviio, -Dffmpeg.location=ffmpeg, -Ddcraw.location=dcraw
2019-09-19 08:51:44,075 INFO  [MediaServer] ------------------------------------------------------------------------
2019-09-19 08:51:44,075 INFO  [MediaServer] License: FREE
2019-09-19 08:51:44,075 INFO  [MediaServer] ------------------------------------------------------------------------
2019-09-19 09:03:32,129 ERROR [MediaServer] An unexpected error occurred. Ending the application. Message: Java heap space
java.lang.OutOfMemoryError: Java heap space


  Code:
root@NAS:/usr/local/serviio/bin# ./serviio.sh

Exception in thread "ActionDistributor: Thread-18" Exception in thread "pool-14-thread-4" Exception in thread "ServioThread-22-null" java.lang.OutOfMemoryError: Java heap space
Exception in thread "Thread-54" java.lang.OutOfMemoryError: Java heap space
Exception in thread "pool-12-thread-1" java.lang.OutOfMemoryError: Java heap space
        at org.serviio.delivery.events.PlaybackEventsManager.getPlaybackState(PlaybackEventsManager.java:222)
        at org.serviio.delivery.events.PlaybackProgressUpdater.updateProgressForAllClients(PlaybackProgressUpdater.java:61)
        at org.serviio.delivery.events.PlaybackProgressUpdater.lambda$1(PlaybackProgressUpdater.java:81)
        at org.serviio.delivery.events.PlaybackProgressUpdater$$Lambda$133/0x00000008402d3040.run(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
java.lang.OutOfMemoryError: Java heap space
        at java.xml/com.sun.org.apache.xml.internal.utils.IntVector.<init>(IntVector.java:71)
        at java.xml/com.sun.org.apache.xml.internal.utils.IntStack.<init>(IntStack.java:54)
        at java.xml/com.sun.org.apache.xpath.internal.XPathContext.<init>(XPathContext.java:821)
        at java.xml/com.sun.org.apache.xpath.internal.XPathContext.<init>(XPathContext.java:309)
        at java.xml/com.sun.org.apache.xpath.internal.jaxp.XPathImplUtil.eval(XPathImplUtil.java:88)
        at java.xml/com.sun.org.apache.xpath.internal.jaxp.XPathImpl.eval(XPathImpl.java:119)
        at java.xml/com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(XPathImpl.java:131)
        at org.serviio.util.XPathUtil.getNode(XPathUtil.java:204)
        at org.serviio.util.XPathUtil.getNodeValue(XPathUtil.java:236)
        at org.serviio.renderer.RendererManager.getRendererServices(RendererManager.java:351)
        at org.serviio.renderer.RendererManager.rendererAvailable(RendererManager.java:136)
        at org.serviio.upnp.discovery.RendererSearchResponseProcessor.run(RendererSearchResponseProcessor.java:65)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
java.lang.OutOfMemoryError: Java heap space
An unexpected error occurred. Ending the application. Message: Java heap space. Check serviio.log for more details.
Exception in thread "Thread-25" java.lang.ExceptionInInitializerError
        at org.serviio.MediaServer$ShutdownHook.run(MediaServer.java:369)
Caused by: java.lang.IllegalStateException: Shutdown in progress
        at java.base/java.lang.ApplicationShutdownHooks.add(ApplicationShutdownHooks.java:66)
        at java.base/java.lang.Runtime.addShutdownHook(Runtime.java:215)
        at org.apache.commons.jcs.engine.control.CompositeCacheManager.initialize(CompositeCacheManager.java:253)
        at org.apache.commons.jcs.engine.control.CompositeCacheManager.getInstance(CompositeCacheManager.java:185)
        at org.apache.commons.jcs.engine.control.CompositeCacheManager.getInstance(CompositeCacheManager.java:161)
        at org.apache.commons.jcs.JCS.getCacheManager(JCS.java:172)
        at org.apache.commons.jcs.JCS.getInstance(JCS.java:190)
        at org.serviio.cache.AbstractCacheDecorator.<init>(AbstractCacheDecorator.java:39)
        at org.serviio.upnp.service.contentdirectory.rest.resources.server.TokenCache.<init>(TokenCache.java:22)
        at org.serviio.upnp.service.contentdirectory.rest.resources.server.LoginServerResource.<clinit>(LoginServerResource.java:37)
        ... 1 more


Anybody can help?
Thanks

Re: Serviio stoped working MediaServer error

PostPosted: Thu Sep 19, 2019 3:22 pm
by atc98092
Looks like a Java error. It appears you are using Linux, so I'd first try updating your Java runtime. It also mentions out of memory, so you might need to allocate more memory to Java. Have no idea how to do that in Linux.

Re: Serviio stoped working MediaServer error

PostPosted: Thu Sep 19, 2019 4:39 pm
by leandrotsampa
I'm using this config (more params you can check in first log): -Xmx2048m -Xms1024m
The java already the last version.


atc98092 wrote:Looks like a Java error. It appears you are using Linux, so I'd first try updating your Java runtime. It also mentions out of memory, so you might need to allocate more memory to Java. Have no idea how to do that in Linux.

Re: Serviio stoped working MediaServer error

PostPosted: Sun Sep 29, 2019 11:42 am
by zip
Weird. Is this a new installation? Or do you have a huge media library?

Re: Serviio stoped working MediaServer error

PostPosted: Wed Oct 02, 2019 11:57 am
by leandrotsampa
zip wrote:Weird. Is this a new installation? Or do you have a huge media library?


I'm not think have many files, it´s more big files. If I remove my library of course the problem stop.

The problem happen a while after run, after change to -Xmx10G -Xms2G takes a little longer but still happen problem.

And before and after changes serviio allways use high resources.