[Solved] Memory consumption under 7.0.0
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
[Solved] Memory consumption under 7.0.0
Hey all!
I just upgraded from 6.8.0 to 7.0.0 and the server kept throwing these:
all the time. I then gradually increased heap memory to 6GB and now it seems to run, but constantly consumes 6GB of memory. I tried activating the garbage collection and now my command line looks like this:
The database folder is also 6GB in size, so I was wondering if that's related to each other? The 6.8.0 version only consumed roughly 1GB of memory, but not 6GB. Is there anything I can do to lower the consumption? I only have 8GB in that machine 
I just upgraded from 6.8.0 to 7.0.0 and the server kept throwing these:
Code: Select all
INFO 17:07:25.649 [Thread-7] Exception in thread "Thread-7" java.lang.OutOfMemoryError: Java heap space
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "MVStore background writer nio:/opt/ums/.config/UMS/database/medias.mv.db
INFO 17:07:38.411 [JmDNS(36720b1580dd.local.).Timer] Exception in thread "JmDNS(36720b1580dd.local.).Timer" java.lang.OutOfMemoryError: Java heap space
ERROR 17:07:38.411 [Library Scanner] Error adding child: "08 - Musik + Ansage.mp3"
java.lang.OutOfMemoryError: Java heap space
Code: Select all
java -XX:PermSize=512m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 \
-XX:InitiatingHeapOccupancyPercent=70 -Xmx6096m -Xss2048k -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djna.nosys=true -classpath ums.jar net.pms.PMS

Re: Memory consumption under 7.0.0
Mine is acting up since the upgrade to V7 as well. I have the default memory setting, which is somewhere around 1GB and it's breaching that during the initial startup scan. When this happens it does not release that memory even if it is done scanning. It just stays pegged slightly past the max. Task Manager shows the java process using over 1500 MB. I can stream music when this happens, but if I try video it just crashes the server. Happening on multiple machines for me.
Are you by chance patched against Meltdown and Spectre? I install the MS Spectre patch last weekend. I swear I was using it Monday without issues though.
Are you by chance patched against Meltdown and Spectre? I install the MS Spectre patch last weekend. I swear I was using it Monday without issues though.
Re: Memory consumption under 7.0.0
Okay, some progress. I've now negated the problem on all systems affected by it. Go into your navigation/Sharing tab and untick the "Enable the Media Library" option. Close and reopen the program. See if the issue has gone away. Apparently this is a caching issue involving the Media Library function. I had caching issue a lot like this when the upgrade to V6 happened. I had to disable caching for a few versions until it was sorted. I'm guessing this must be a regression.
Re: Memory consumption under 7.0.0
That's good news. I'm running on Linux in headless mode though, so nothing to to with Windows Spectre patches for me.
What is the setting named in the config file? I have set before, but that didn't seem to have suppressed it. Also UMS shows the transcode folder although it was and still is disabled in the config file.
What is the setting named in the config file? I have set
Code: Select all
hide_media_library_folder = true
Re: Memory consumption under 7.0.0
In V7 (UMS.conf) some of the commands have been changed.
Prior to V7 they were hide = true. Now they are show = false.
So to hide the transcode folder try changing:
hide_transcode_folder = true
To
show_transcode_folder = false
Also in V7
hide_media_library_folder = true
Becomes
show_media_library_folder = false
Prior to V7 they were hide = true. Now they are show = false.
So to hide the transcode folder try changing:
hide_transcode_folder = true
To
show_transcode_folder = false
Also in V7
hide_media_library_folder = true
Becomes
show_media_library_folder = false
Re: Memory consumption under 7.0.0
Thanks, that did it! But why does the UMS.conf that ships with 7.0.0 only contain hide_* default and not show_* ? Weird. Anyway… glad it's working now
) My children thank thee ;o)

Re: Memory consumption under 7.0.0
Glad it worked.
I was thinking the same about the V7 UMS.conf file as well. Strange.
I was thinking the same about the V7 UMS.conf file as well. Strange.
Re: Memory consumption under 7.0.0
Would be good to get some logs so we can fix this 

Re: Memory consumption under 7.0.0
In V7 I was getting a java heap space error quite quickly.
I modified this cache setting in UMS.conf to:
use_cache = false
And now it does not seem to be happening.
The log (In TRACE mode) is attached from when it was happening.
I modified this cache setting in UMS.conf to:
use_cache = false
And now it does not seem to be happening.
The log (In TRACE mode) is attached from when it was happening.
- Attachments
-
- debug V7.zip
- (3.8 MiB) Downloaded 559 times
Re: Memory consumption under 7.0.0
Thanks boss, it seems to be related to a lot of images being processed and it probably would have been a bug for a long time but didn't get noticed until we made UMS do the scan on startup. It looks like we need to work on freeing memory during the scan. I will make an issue for it on our tracker.