High memory usage and java.lang.OutOfMemoryError

Need help? Post your questions here.

Moderator: moderators

High memory usage and java.lang.OutOfMemoryError

Postby vbs » Wed Apr 02, 2014 7:15 pm

I am using subsonic happily since years but since a while (maybe since the last update) I have the problem that subsonic uses a huge amount of memory. For a while it kept crashing like once day saying " java.lang.OutOfMemoryError" in the logfile. I repeatedly increased the memory limit to 300, then to 600 and now to 1000MB. Currently it is stable since 2 days but the Subsonic Control Panel says "Memory used: 947MB" so it is quite close to the 1000MB limit already.
It took the process about 40 hours to get to the 947MB usage but now it seems stable. I didnt even really used subsonic within that time.

So, is this high amount of used memory (~1000MB) a normal thing? I am quite sure it was much less for me in the past. I had the memory limit at about 300MB if I remember correctly.
Is there anything I can do about? Can I provide any more information you might need? I currently have no logfile showing the OutOfMemory crash but I can provide one if needed.

Big thanks! Btw. I am Subsonic Premium user (If it makes a difference :)

<-------------------------Subsonic Help Request---------------------->
Problem Description: Subsonic high memory usage
Troubleshooting Steps: Restarted subsonic. No other ideas yet
Subsonic Version: 4.9 (build 3853) – 23. Januar 2014
Server Version: jetty-6.1.x, java 1.7.0_51, Windows 8 (950,2 MB / 966,7 MB)
Hardware Platform:Windows 8 on an i5
Java Memory Limit: 1000 MB currently
<-------------------------Subsonic Help Request---------------------->
vbs
 
Posts: 12
Joined: Wed Nov 09, 2011 8:11 pm

Re: High memory usage and java.lang.OutOfMemoryError

Postby daneren2005 » Wed Apr 02, 2014 7:23 pm

You can try running the cleanup function from the admin settings, and then restarting the service. It might be from legacy crap filling up the in the memory db.

Sent from my Nexus 5 using Tapatalk
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

Re: High memory usage and java.lang.OutOfMemoryError

Postby vbs » Thu Apr 03, 2014 7:16 pm

Thanks, I am currently testing that. After about 24 hours I am at 374MB now. What is roughly the memory usage with a database with 54000 songs?
vbs
 
Posts: 12
Joined: Wed Nov 09, 2011 8:11 pm

Re: High memory usage and java.lang.OutOfMemoryError

Postby daneren2005 » Thu Apr 03, 2014 7:52 pm

There are people with much larger db then that that don't have this problem. I have no idea what causes some peoples servers to run with such high memory usage.

Sent from my Nexus 5 using Tapatalk
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

Re: High memory usage and java.lang.OutOfMemoryError

Postby vbs » Thu Apr 03, 2014 9:30 pm

So 400MB is also too high already?
vbs
 
Posts: 12
Joined: Wed Nov 09, 2011 8:11 pm

Re: High memory usage and java.lang.OutOfMemoryError

Postby vbs » Sun Apr 06, 2014 4:10 pm

Sadly cleaning the database did not help here :(

But I am pretty sure I know now what causes this:
I took a java heap dump using Jamp and it showed one single memory object taking 240 MB of heap memory:
Image

The object is related to Cling which seems to be the UPNP library Subsonic uses for its DLNA service. So I think the DLNA server is the culprit. I disabled DLNA in the Subsonic settings and the problem is gone :) I am now permanently hovering at around 80 MB memory usage.
This is also totally in line with my assumption that this problem popped up with the latest subsonic update (4.9). According to the changelog the DLNA server has been introduced with version 4.9.

This is the Java heap dump: https://dl.dropboxusercontent.com/u/246 ... p_dump.rar
vbs
 
Posts: 12
Joined: Wed Nov 09, 2011 8:11 pm

Re: High memory usage and java.lang.OutOfMemoryError

Postby daneren2005 » Sun Apr 06, 2014 5:55 pm

Sweet that is great to know that there is a reason for it at least. I wonder if you have something that is constantly refreshing UPnP listings to make it constantly increase memory though. I don't seem to have the same problem as you do.

Sent from my Nexus 5 using Tapatalk
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

Re: High memory usage and java.lang.OutOfMemoryError

Postby vbs » Sun Apr 06, 2014 6:05 pm

I dont really use that UPnP thing but I have several devices in my network capable of UPnP (2x XBMC, Logitech Squeezebox, Samsung SmartTV etc). Maybe they are talking with subsonic in some way triggering the problem.
vbs
 
Posts: 12
Joined: Wed Nov 09, 2011 8:11 pm

Re: High memory usage and java.lang.OutOfMemoryError

Postby vbs » Sun Apr 06, 2014 6:40 pm

Btw I filed a bug report, maybe some dev can look into it:
http://sourceforge.net/p/subsonic/bugs/115/
vbs
 
Posts: 12
Joined: Wed Nov 09, 2011 8:11 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 81 guests