Page 1 of 1

Serviio Services Stop Running

PostPosted: Wed Aug 26, 2020 5:03 pm
by pingoes
Hello,

I am having some issues with my Serviio installed on my W1064X V.2004.
In a ramdomly time, the Serviio services stop running, i have to start it again. I played with Automatic and automatic delay on services but no changes.

I notificed that everytime it stops, i get this log;

  Code:
2020-08-26 16:08:30,611 ERROR [ServiceInvoker] Operation Browse threw an exception
java.lang.OutOfMemoryError: Java heap space
   at java.util.Arrays.copyOfRange(Arrays.java:3664)
   at java.lang.StringBuffer.toString(StringBuffer.java:669)
   at java.io.StringWriter.toString(StringWriter.java:210)
   at org.serviio.util.XmlUtils.getStringFromDocument(XmlUtils.java:88)
   at org.serviio.upnp.service.contentdirectory.ContentDirectory.setupSuccessfulResult(ContentDirectory.java:359)
   at org.serviio.upnp.service.contentdirectory.ContentDirectory.Browse(ContentDirectory.java:165)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:498)
   at org.serviio.upnp.protocol.soap.ServiceInvoker.invokeOperation(ServiceInvoker.java:214)
   at org.serviio.upnp.protocol.soap.ServiceInvoker.invokeService(ServiceInvoker.java:75)
   at org.serviio.upnp.webserver.ServiceControlRequestHandler.handleRequest(ServiceControlRequestHandler.java:65)
   at org.serviio.upnp.webserver.AbstractRequestHandler.handle(AbstractRequestHandler.java:66)
   at org.apache.http.protocol.HttpService.doService(HttpService.java:423)
   at org.serviio.upnp.webserver.ServiioHttpService.doService(ServiioHttpService.java:78)
   at org.apache.http.protocol.HttpService.handleRequest(HttpService.java:341)
   at org.serviio.upnp.webserver.WebServer$WorkerThread.run(WebServer.java:204)
2020-08-26 16:16:46,008 INFO  [LibraryDeltaScanner] Added repository 'J:\' to delta scanner (POLLER)
2020-08-26 16:16:46,035 INFO  [LibraryDeltaScanner] Added repository 'K:\Movies-Downloads' to delta scanner (POLLER)
2020-08-26 16:17:13,045 INFO  [LibraryDeltaScanner] Added repository 'L:\' to delta scanner (POLLER)
2020-08-26 16:17:13,076 INFO  [LibraryDeltaScanner] Added repository 'R:\' to delta scanner (POLLER)
2020-08-26 16:17:38,331 ERROR [ServiceInvoker] Operation Browse threw an exception
java.lang.OutOfMemoryError: Java heap space
   at java.util.Arrays.copyOf(Arrays.java:3332)
   at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
   at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:596)
   at java.lang.StringBuffer.append(StringBuffer.java:367)
   at java.io.StringWriter.write(StringWriter.java:94)
   at com.sun.org.apache.xml.internal.serializer.ToStream.characters(ToStream.java:1488)
   at com.sun.org.apache.xml.internal.serializer.ToUnknownStream.characters(ToUnknownStream.java:814)
   at com.sun.org.apache.xml.internal.serializer.ToUnknownStream.characters(ToUnknownStream.java:348)
   at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:244)
   at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:230)
   at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:230)
   at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:230)
   at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:136)
   at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:98)
   at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:684)
   at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:728)
   at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:343)
   at org.serviio.util.XmlUtils.getStringFromDocument(XmlUtils.java:83)
   at org.serviio.upnp.service.contentdirectory.ContentDirectory.setupSuccessfulResult(ContentDirectory.java:359)
   at org.serviio.upnp.service.contentdirectory.ContentDirectory.Browse(ContentDirectory.java:165)
   at sun.reflect.GeneratedMethodAccessor298.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:498)
   at org.serviio.upnp.protocol.soap.ServiceInvoker.invokeOperation(ServiceInvoker.java:214)
   at org.serviio.upnp.protocol.soap.ServiceInvoker.invokeService(ServiceInvoker.java:75)
   at org.serviio.upnp.webserver.ServiceControlRequestHandler.handleRequest(ServiceControlRequestHandler.java:65)
   at org.serviio.upnp.webserver.AbstractRequestHandler.handle(AbstractRequestHandler.java:66)
   at org.apache.http.protocol.HttpService.doService(HttpService.java:423)
   at org.serviio.upnp.webserver.ServiioHttpService.doService(ServiioHttpService.java:78)
   at org.apache.http.protocol.HttpService.handleRequest(HttpService.java:341)
   at org.serviio.upnp.webserver.WebServer$WorkerThread.run(WebServer.java:204)
2020-08-26 16:17:54,439 INFO  [LibraryDeltaScanner] Added repository 'U:\' to delta scanner (POLLER)
2020-08-26 16:17:54,439 INFO  [LibraryDeltaScanner] Starting the library delta scan


Sometimes, i see that the service is running but i cant use the android app or web service, I have to stop the service and run it again.
I checked some info online concerning this memory error but I have 16gb of RAM on it , constantly using half % of it, using it as server.
I added -Xmx3072m on runtime parameters on Java.

Can someone give me some orientation ?

Thanks in advance.

Re: Serviio Services Stop Running

PostPosted: Wed Aug 26, 2020 10:45 pm
by atc98092
What version of Windows are you running? With Windows 10 (64 bit) I have no issues with Java memory. Both of my systems have 8 GB of ram, and the -Xmx setting is only 512m.

And you do have that setting in the ServiioService.exe.vmoptions file located in the c:\Program Files\Serviio\bin folder, right?

Re: Serviio Services Stop Running

PostPosted: Thu Aug 27, 2020 11:54 am
by pingoes
I have windows 10 64 bits. with 16gb of RAM. I am using the Serviio 2.1. I added the -xmx on the java directly. I saw the file that you specified and it was on 512m. I just tried to change it to 3072m but then when i try to start the Serviio services, i get the following error: windows could not start the serviio service on local computer. Error 1-67: the process terminated unexpectedly.

Re: Serviio Services Stop Running

PostPosted: Thu Aug 27, 2020 4:32 pm
by pingoes
Just an update. It seems to be working fine now after deleting content on : C:\Users\XxX\AppData\Roaming\Serviio-Console-Wrapper.
After starting services, it's been running for more than an hour scanning new files without interruptions/java errors.

Re: Serviio Services Stop Running

PostPosted: Thu Aug 27, 2020 6:29 pm
by atc98092
pingoes wrote:I have windows 10 64 bits. with 16gb of RAM. I am using the Serviio 2.1. I added the -xmx on the java directly. I saw the file that you specified and it was on 512m. I just tried to change it to 3072m but then when i try to start the Serviio services, i get the following error: windows could not start the serviio service on local computer. Error 1-67: the process terminated unexpectedly.


Serviio uses an embedded version of Java, so if you changed the settings for the JVM that is installed on your computer it has no effect on Serviio. You need to make the change in the file I specified, but I have no idea how large a number it will accept.

Re: Serviio Services Stop Running

PostPosted: Fri Aug 28, 2020 12:48 am
by pingoes
Finally i changed it to xmx1g and working fine now,

Re: Serviio Services Stop Running

PostPosted: Fri Aug 28, 2020 1:43 am
by atc98092
Excellent, good job!