OutOfMemoryError: Java heap space

For help and support with PS3 Media Server in general
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

OutOfMemoryError: Java heap space

Postby akivam » Wed Apr 24, 2013 10:18 pm

This is a new install, first time with this media server for me.

Info: PS3 Media Server 1.81.0 Build: 5b9f782ef (2013-04-21)
Windows 7 Home Premium, SP1 with latest patches
32-bit, 3gb RAM, AMD Athalon Dual Core QL 65 2.1ghz
Java: 1.7.0_21-Oracle Corporation

Renderer - iPad, MLPlayer Lite

When doing the simple action of trying to view family photos, I'm getting a hanging PS3 server with Java heap space errors. Here's the thing, I already increased the memory..

(Java) Memory: 1237 MB

I'm trying to access photo directories of approximately 20-80 photos, JPEG's. When doing so the media server start's throwing (lots of) errors and then hangs.

Code: Select all
INFO  2013-04-25 00:10:33.163 [pool-12-thread-3] Exception in thread "pool-12-thread-3" java.lang.OutOfMemoryError: Java heap space
INFO  2013-04-25 00:10:33.168 [pool-12-thread-3]    at java.awt.image.DataBufferByte.<init>(Unknown Source)
INFO  2013-04-25 00:10:33.209 [pool-12-thread-3]    at java.awt.image.Raster.createInterleavedRaster(Unknown Source)
INFO  2013-04-25 00:10:33.212 [pool-12-thread-3]    at java.awt.image.Raster.createInterleavedRaster(Unknown Source)
INFO  2013-04-25 00:10:33.225 [pool-12-thread-3]    at java.awt.image.ComponentColorModel.createCompatibleWritableRaster(Unknown Source)
INFO  2013-04-25 00:10:33.226 [pool-12-thread-3]    at java.awt.image.BufferedImage.<init>(Unknown Source)
INFO  2013-04-25 00:10:33.227 [pool-12-thread-3]    at net.coobird.thumbnailator.resizers.ProgressiveBilinearResizer.resize(Unknown Source)
INFO  2013-04-25 00:10:33.227 [pool-12-thread-3]    at net.coobird.thumbnailator.resizers.Resizers.resize(Unknown Source)
INFO  2013-04-25 00:10:33.227 [pool-12-thread-3]    at net.coobird.thumbnailator.makers.ThumbnailMaker.makeThumbnail(Unknown Source)
INFO  2013-04-25 00:10:33.228 [pool-12-thread-3]    at net.coobird.thumbnailator.makers.FixedSizeThumbnailMaker.make(Unknown Source)
INFO  2013-04-25 00:10:33.228 [pool-12-thread-3]    at net.coobird.thumbnailator.Thumbnailator.createThumbnail(Unknown Source)
INFO  2013-04-25 00:10:33.228 [pool-12-thread-3]    at net.coobird.thumbnailator.Thumbnails$Builder.toFile(Unknown Source)
INFO  2013-04-25 00:10:33.228 [pool-12-thread-3]    at net.pms.dlna.DLNAMediaInfo.parse(DLNAMediaInfo.java:678)
INFO  2013-04-25 00:10:33.229 [pool-12-thread-3]    at net.pms.formats.Format.parse(Format.java:224)
INFO  2013-04-25 00:10:33.229 [pool-12-thread-3]    at net.pms.dlna.RealFile.resolve(RealFile.java:193)
INFO  2013-04-25 00:10:33.229 [pool-12-thread-3]    at net.pms.dlna.DLNAResource.run(DLNAResource.java:803)
INFO  2013-04-25 00:10:33.230 [pool-12-thread-3]    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
INFO  2013-04-25 00:10:33.230 [pool-12-thread-3]    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO  2013-04-25 00:10:33.230 [pool-12-thread-3]    at java.lang.Thread.run(Unknown Source)
(3.01 KiB) Downloaded 53 times
Last edited by Raptor399 on Sat Apr 27, 2013 10:29 am, edited 1 time in total.
Reason: Edited for code fragments
Posts: 5
Joined: Wed Apr 24, 2013 9:48 pm

Re: OutOfMemoryError: Java heap space

Postby akivam » Wed Apr 24, 2013 10:54 pm

Second time around, I reduced the Transcoder memory setting to 256m, given more free memory for the PMS. That seemed to help... until it just completely crashed. (Not running as a service.)

Pulling it new debug log, it seems it crashed with excessive out of memory errors when it ran into a .MOV file on the photo directory and invoked ffmpeg to try to get a thumbnail. (See attached debug.log in the zip)

Yet it seems to me what I'm trying to do is a pretty perfectly normal thing without excessive file sizes or file quantity. Does PMS really requires resource levels significantly beyond your average desktop PC?

Code: Select all
nnot grow buffer size from 0 bytes to 389,244,518 bytes either.
INFO  2013-04-25 00:37:56.789 [pool-24-thread-23] FATAL ERROR: OutOfMemory / dumping stats
DEBUG 2013-04-25 00:37:56.794 [PMS Listeners Stopper] Forcing shutdown of all active processes
INFO  2013-04-25 00:37:56.794 [PMS Listeners Stopper] Stopping server on host and port 5001...
DEBUG 2013-04-25 00:37:56.789 [Thread-25]     Stream #0:0(eng): Video: mjpeg (jpeg / 0x6765706A), yuvj422p, 320x240, 1736 kb/s, 15 fps, 15 tbr, 600 tbn, 600 tbc
DEBUG 2013-04-25 00:37:56.998 [Thread-25]     Stream #0:1(eng): Audio: pcm_u8 (raw  / 0x20776172), 8000 Hz, mono, u8, 64 kb/s
DEBUG 2013-04-25 00:37:56.998 [Thread-25] At least one output file must be specified
WARN  2013-04-25 00:37:57.361 [pool-24-thread-22] Can't create thumbnail for F:\FamilyPhotos\2007\03-12 MirBirthday-DubrowWedding\03-12-- 074.mov: No suitable ImageReader found for F:\FamilyPhotos\2007\03-12 MirBirthday-DubrowWedding\03-12-- 074.mov.
DEBUG 2013-04-25 00:37:58.143 [pool-24-thread-22] Starting "C:\Program Files\PS3 Media Server\win32\ffmpeg.exe" -ss 0 -i "F:\FamilyPhotos\2007\03-12 MirBirthday-DubrowWedding\03-12-- 074.mov" -an -an -an -an -an -an -an -an -an
(6.44 KiB) Downloaded 57 times
Last edited by Raptor399 on Sat Apr 27, 2013 10:29 am, edited 1 time in total.
Reason: Edited for code fragments
Posts: 5
Joined: Wed Apr 24, 2013 9:48 pm

Re: OutOfMemoryError: Java heap space

Postby meskibob » Thu Apr 25, 2013 12:58 pm

Assuming you're already following the FAQ - viewtopic.php?f=6&t=3507&start=30#p38969
You may need to tailor the values some more... Are you using any plugins? What else are you running on the machine (ie how much free RAM do you have)?
I wouldn't expect the heap error when just viewing photos, although MOV files can be finicky for some reason.
I provide NO application support via PM or email, so please post your question to the forum per the Forum Rules.
Posts: 4789
Joined: Mon Jan 19, 2009 4:11 pm

Re: OutOfMemoryError: Java heap space

Postby akivam » Thu Apr 25, 2013 10:21 pm

No plug ins.

3gb on the machine, and the memory monitor shows free physical space when PSM is running.

As I mentioned above, already increased the Java heap to 1.5gb. Same problem, though later (more photos and .mov files passed before it dies).

Though you might not expect it, that's what's happening. Limitations of 32-bit perhaps? Or having 70 photos in a directory needing thumbnails?

Regardless, makes PSM useless to me.
Posts: 5
Joined: Wed Apr 24, 2013 9:48 pm

Re: OutOfMemoryError: Java heap space

Postby Raptor399 » Sat Apr 27, 2013 10:27 am

It's been a while since I browsed the thumbnailing code, but remember getting the impression that the code keeps thumbnail images in memory. So if they would happen to be large, you could run out of memory fast.

What happens if you switch off image thumbnails under "Navigation / Share settings"?
Project Member
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: OutOfMemoryError: Java heap space

Postby SubJunk » Mon May 06, 2013 1:36 am

It's a bug with the latest Java update. Rollback to 7u17 to fix it :)
Posts: 1212
Joined: Fri Mar 27, 2009 5:25 am

Re: OutOfMemoryError: Java heap space

Postby chocolateboy » Thu May 23, 2013 9:46 pm

This should be fixed. Please try a snapshot build.
Project Member
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Return to General Help and Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 12 guests