java.lang.OutOfMemoryError: Java heap space (92 MB Max Memory)

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
sblack55
Posts: 22
Joined: 23 Sep 2015, 18:43

java.lang.OutOfMemoryError: Java heap space (92 MB Max Memory)

Post by sblack55 »

After installing the latest FileBot beta to resolve an issue with JRE12, I am now having frequent failures due to Java Heap Space shortage, as seen in the log below. This seems to be happening with larger files such as movies vs. episodes or HD vs. SD.

Code: Select all

Jul 15 11:01:02: |---< filebot log >---------------------------------------------------------|
Jul 15 11:08:38: Run script [fn:amc] at [Mon Jul 15 11:01:40 EDT 2019]
Jul 15 11:08:38: Parameter: seriesFormat = TV Shows/{ny}/Season {s}/{n}.{s00e00}.{t}
Jul 15 11:08:38: Parameter: movieFormat = Movies/{ny}/{n}
Jul 15 11:08:38: Parameter: minFileSize = 0
Jul 15 11:08:38: Parameter: ut_label = Movie
Jul 15 11:08:38: Argument[0]: File does not exist: /volume1/PVR/Captains Courageous/Captains Courageous-1.ts
Jul 15 11:08:38: Input: /volume1/PVR/Captains Courageous/Captains Courageous-1.ts
Jul 15 11:08:38: Group: [Movie:true] => [Captains Courageous-1.ts]
Jul 15 11:08:38: Rename movies using [TheMovieDB]
Jul 15 11:08:38: Auto-detect movie from context: [/volume1/PVR/Captains Courageous/Captains Courageous-1.ts]
Jul 15 11:08:38: Java heap space
Jul 15 11:08:38: java.lang.OutOfMemoryError: Java heap space
Jul 15 11:08:38: at net.filebot.media.HighPerformanceMatcher.prepare(HighPerformanceMatcher.java:27)
Jul 15 11:08:38: at net.filebot.media.IndexEntry.getLenientKey(IndexEntry.java:35)
Jul 15 11:08:38: at net.filebot.media.MediaDetection.matchMovieName(MediaDetection.java:887)
Jul 15 11:08:38: at net.filebot.media.MediaDetection.checkMovie(MediaDetection.java:850)
Jul 15 11:08:38: at net.filebot.media.MediaDetection.guessMovieFolder(MediaDetection.java:823)
Jul 15 11:08:38: at net.filebot.media.MediaDetection.detectMovie(MediaDetection.java:603)
Jul 15 11:08:38: at net.filebot.media.MediaDetection.detectMovieWithYear(MediaDetection.java:685)
Jul 15 11:08:38: at net.filebot.cli.CmdlineOperations.renameMovie(CmdlineOperations.java:441)
Jul 15 11:08:38: at net.filebot.cli.CmdlineOperations.rename(CmdlineOperations.java:95)
Jul 15 11:08:38: at net.filebot.cli.ScriptShellBaseClass.rename(ScriptShellBaseClass.java:366)
Jul 15 11:08:38: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Jul 15 11:08:38: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Jul 15 11:08:38: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Jul 15 11:08:38: at Script1$_run_closure64.doCall(Script1.groovy:395)
Jul 15 11:08:38: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Jul 15 11:08:38: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Jul 15 11:08:38: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Jul 15 11:08:38: 
Jul 15 11:08:39: Error (o_O)
Jul 15 11:08:39: |---< filebot log >---------------------------------------------------------|
Synology Environment
  • DSM Model: DSM216se
  • CPU: MARVELL Armada 370 88F6707
  • CPU Clock rate: 800MHz
  • CPU Cores: 1
  • Total Physical Memory: 256MB
  • DSM Version: DSM 6.2.2-24922 Update 2
sysinfo output

Code: Select all

FileBot 4.8.6 (r6538)
JNA Native: 6.0.0
MediaInfo: 19.04
p7zip: p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,1 CPU)
unrar: UNRAR 5.21 freeware
FFprobe: java.io.IOException: Cannot run program "/volume1/@appstore/MediaServer/bin/ffprobe": error=2, No such file or directory
Chromaprint: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2019-07-13 (r576)
Groovy: 2.5.7
JRE: LibericaJDK Runtime Environment 12.0.1-BellSoft
JVM: 32-bit LibericaJDK Client VM
CPU/MEM: 1 Core / 92 MB Max Memory / 16 MB Used Memory
OS: Linux (arm)
HW: Linux NetPVR 3.2.40 #24922 Wed Jul 3 16:34:22 CST 2019 armv7l GNU/Linux synology_armada370_216se
DATA: /volume1/@appstore/filebot/data/admin
Package: SPK
Activate License [P4289557] on [Mon Jul 15 11:19:19 EDT 2019]
License: FileBot License P4289557 (Valid-Until: 2019-08-15)
Done ヾ(@⌒ー⌒@)ノ
sblack55
Posts: 22
Joined: 23 Sep 2015, 18:43

Re: Java heap space error with 4.8.6 beta

Post by sblack55 »

And yes, the DSM216se is woefully lacking in RAM and cannot be expanded!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Java heap space error with 4.8.6 beta

Post by rednoah »

92 MB is definitely not enough to run the amc script in all it's glory...

You can set -Xmx192m via JAVA_OPTS to give it a little bit more:

Code: Select all

export JAVA_OPTS="-Xmx192m"
filebot -script fn:sysinfo
:idea: Please read the FAQ and How to Request Help.
sblack55
Posts: 22
Joined: 23 Sep 2015, 18:43

Re: Java heap space error with 4.8.6 beta

Post by sblack55 »

Thanks, I'll give that a shot and report back.
sblack55
Posts: 22
Joined: 23 Sep 2015, 18:43

Re: java.lang.OutOfMemoryError: Java heap space (92 MB Max Memory)

Post by sblack55 »

FYI, I've decided to abandon my attempt to run PVR on the DS216se. It is just clearly underpowered and not up to the task. Thanks for the assistance, I did learn a few things along the way.
Post Reply