Ubuntu: Creating Thumbnail problem? (sometimes)

Need help? Post your questions here.

Moderator: moderators

Ubuntu: Creating Thumbnail problem? (sometimes)

Postby Luterin » Fri Jul 02, 2010 11:52 pm

I'm using a brand new server I just built and installed Ubuntu 10.04 on with Subsonic added to it.

When I browse thru my music with my browser the server "hangs" when it comes across some cover images and the log produces a bunch of warnings on that specific picture like this:

[2010-07-03 01:19:07,317] WARN CoverArtController - Failed to create thumbnail for /var/media/Media/Music/MP3/ALBUM/W/Within Temptation/Within Temptation - Stand My Ground (Limited Edition)/00_within_temptation_-_stand_my_ground-ltd.ed.-cdm-2004-cover.jpg
java.lang.OutOfMemoryError: Java heap space

During this time java more or less uses up 100% of one core, and it takes a couple of minutes for it to stop trying to do whatever it is that it's trying to do over and over. While it's doing this the web interface is completely inresponsive and streaming to other players also stops while it's doing this.

I removed that image, so it doesn't "hang" in the same place anymore, but it gives simillar messages on some other images aswell, and I rather have it "just work" than have to go thru all old covers.

Any ideas on what to do?

On a sidenote, it worked fine on the exact same files when I ran them on a windows machine with subsonic as a service there.

Thanks in advance,
Luterin
Luterin
 
Posts: 25
Joined: Thu Jun 03, 2010 6:28 pm

Out of Memory

Postby jeremyh » Mon Jul 12, 2010 2:16 pm

Sounds like your java stack ran out of memory and started swapping to disk. If your image file is very large (or is corrupt in such a way that it uses a bunch of memory), it would cause the problem.

You just need to increase the maximum memory allowed for the heap in the startup script. On linux it is the tomcat startup script (/etc/init.d/tomcat6 - if you are using tomcat - alternatively, it would be in whatever environment you are running subsonic, like jetty, etc).

I adjusted the line:
JAVA_OPTS="-Djava.awt.headless=true -Xmx1024M"

the -Xmx switch specifies the maximum heap to allow for the process.
(you can also put in -Xms to adjust the initial heap size).

see http://forums.sun.com/thread.jspa?threadID=326216
jeremyh
 
Posts: 49
Joined: Thu Feb 05, 2009 12:01 am
Location: Westminster, Colorado, United States

Postby Luterin » Wed Jul 14, 2010 9:05 am

Ok, thanks for the info. I'll dig into my Ubuntu and see what Java that I have on it. Didn't find anything interesting in init.d anyway, but i'll find it somewhere.

Thanks,
Luterin
Luterin
 
Posts: 25
Joined: Thu Jun 03, 2010 6:28 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 43 guests