Page 1 of 3

Java Heap Size Errors

Posted: Sun Dec 31, 2017 4:36 pm
by boss
Every few days my devices cannot see UMS. I have UMS running on a Linux server.
When I check my server, UMS is still actually running.
The UMS logs always show a Java error when this happens:
DEBUG 2017-12-27 20:19:12.159 [HTTPv2 Request Worker 4] Caught exception: Java heap space
INFO 2017-12-27 20:21:05.341 [cling-2380] Exception in thread "cling-2380" java.lang.OutOfMemoryError: Java heap space
INFO 2017-12-27 20:21:07.284 [cling-2376] Exception in thread "cling-2376" java.lang.OutOfMemoryError: Java heap space
INFO 2017-12-27 20:21:20.611 [SocketListener(satan-itsbiz-com-au.local.)] Exception in thread "SocketListener(satan-itsbiz-com-au.local.)" java.lang.IllegalStateException: Timer already cancelled.

My Java heap space was previously 512M and now I have set it to 1024M to see if it resolves the issue.

What is the general consensus:
heap space - 512M was to small
Or
UMS has a memory leak

Interested to hear thoughts.
Thanks

Re: Java Heap Size Errors

Posted: Sun Dec 31, 2017 4:50 pm
by Nadahar
UMS doesn't have a memory leak in the traditional sense, but it keeps the metadata for all browsed or scanned media in memory and it is never freed. It depends on how large your media library is, and on how you use it. You don't mention which version you're using - 7.0.0 isn't "stable" yet and has several issues, one of which has to do with this.

Re: Java Heap Size Errors

Posted: Sun Dec 31, 2017 5:18 pm
by boss
I'm using 6.7.4.

My library is not very big at all. Or maybe it is. It is 620GB and 28,000 files with the most in Photos.
And this error happens when not in use.
EG: Using UMS and all going fine. Don't use it for 3 days and then it isn't shown on the devices and the error in the logs.

Re: Java Heap Size Errors

Posted: Sun Dec 31, 2017 6:24 pm
by Nadahar
Can you let it run in "trace" mode for 3 days, and then upload the debug files? The log might indicate what it's doing that's causing this.

Re: Java Heap Size Errors

Posted: Sun Dec 31, 2017 6:31 pm
by boss
Will do. I will change the heap size back to the default as it was when the problem was happening and set the log to TRACE mode.

Thanks

Re: Java Heap Size Errors

Posted: Thu Jan 04, 2018 3:10 pm
by boss
@ Nadahar

I have the log file in TRACE mode.
But... The log file is 950MB and the ZIP file of it is 44MB.

Should I attach the 44MB ZIP file or is that too big?

Re: Java Heap Size Errors

Posted: Thu Jan 04, 2018 5:49 pm
by Nadahar
I don't think the forum will accept that. Is there somewhere you can upload it and add a link here?

Re: Java Heap Size Errors

Posted: Thu Jan 04, 2018 7:55 pm
by boss
I have uploaded the zip file to a file sharing service here:
https://ufile.io/fcrz6

From what I can work out, it happens if I watch quite a few videos one after the other.
Whilst I continue to watch the videos it is ok. But when I stop, the next time I start one of my renderers they don't see UMS.
And that's when the Java Heap Size Errors are in the logs.

Thank you.

Re: Java Heap Size Errors

Posted: Sun Jan 07, 2018 4:08 pm
by boss
bump

Re: Java Heap Size Errors

Posted: Sun Jan 07, 2018 5:09 pm
by Nadahar
I can't open the log file in a normal text editor because of its size, so I have to find some software that can open it. Looking through a 950 MB logfile is bound to take some time anyway, so don't hold your breath.