FB stopped working, Java Heap Out of Memory

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
stooovie
Posts: 15
Joined: 16 Sep 2013, 09:38

FB stopped working, Java Heap Out of Memory

Post by stooovie »

Hi!

I had FB working flawlessly for many months on my Syno DSM 215j. But a few weeks ago, it stopped working. I haven't installed anything new. There's Sonarr (on top of mono) and Deluge running. I haven't installed any new packages, in fact, I disabled some to save RAM, but to no avail.

Java -version gives:

Code: Select all

java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) Client VM (build 25.91-b14, mixed mode)
Filebot is 4.7.2. I run it via Syno's Task Scheduler. It worked for a long time on DSM6.

Here's the script:

Code: Select all

filebot -script 'fn:amc' /volume1/Public/Downloads --output /volume1/Public/Video --action move -non-strict --conflict auto --lang en --def artwork=n 'subtitles=cs,en' 'clean=y' 'deleteAfterExtract=y' 'xbmc=libreelec.local.' export JAVA_OPTS=-Xmx256m
The "export JAVA_OPTS=-Xmx256m" doesn't help the issue.

Here's the output log:

Code: Select all

Run script [fn:amc] at [Tue Nov 15 23:17:49 GMT+01:00 2016]
Parameter: artwork = n
Parameter: subtitles = cs,en
Parameter: clean = y
Parameter: deleteAfterExtract = y
Parameter: xbmc = libreelec.local.
Argument[0]: /volume1/Public/Downloads
Argument[1]: File does not exist: /usr/syno/synoman/webapi/export
Argument[2]: File does not exist: /usr/syno/synoman/webapi/JAVA_OPTS=-Xmx256m
Ignore system path: /volume1/Public/Downloads/@eaDir
Input: /volume1/Public/Downloads/Blackish.S03E05.HDTV.x264-FLEET.mkv
Input: /volume1/Public/Downloads/Cat_Soup.DVD(AC3-5.1)[0C388163].avi
Input: /volume1/Public/Downloads/Duck soup 1933.avi
Input: /volume1/Public/Downloads/Rectify.S04E01.HDTV.x264-FLEET.mkv
Input: /volume1/Public/Downloads/Westworld.S01E06.HDTV.x264-FLEET.mkv
Input: /volume1/Public/Downloads/black.ish.s03e04.whos.afraid.of.the.big.black.man.720p.webrip.hevc.x265.rmteam.mkv
Duck soup 1933.avi [series: Soup, movie: Duck Soup (1933)]
Exclude Series: Soup
xattr: [Rectify.S04E01.HDTV.x264-FLEET.mkv] => [Rectify - 4x01 - A House Divided]
Group: [tvs:blackish] => [Blackish.S03E05.HDTV.x264-FLEET.mkv]
Group: [anime:rectify] => [Cat_Soup.DVD(AC3-5.1)[0C388163].avi]
Group: [tvs:null, mov:duck soup 1933] => [Duck soup 1933.avi]
Group: [tvs:rectify] => [Rectify.S04E01.HDTV.x264-FLEET.mkv]
Group: [tvs:westworld] => [Westworld.S01E06.HDTV.x264-FLEET.mkv]
Group: [tvs:black ish] => [black.ish.s03e04.whos.afraid.of.the.big.black.man.720p.webrip.hevc.x265.rmteam.mkv]
Java heap space
java.lang.OutOfMemoryError: Java heap space
	at org.tukaani.xz.lz.LZDecoder.<init>(Unknown Source)
	at org.tukaani.xz.LZMA2InputStream.<init>(Unknown Source)
	at org.tukaani.xz.LZMA2InputStream.<init>(Unknown Source)
	at org.tukaani.xz.LZMA2Decoder.getInputStream(Unknown Source)
	at org.tukaani.xz.BlockInputStream.<init>(Unknown Source)
	at org.tukaani.xz.SingleXZInputStream.read(Unknown Source)
	at org.tukaani.xz.XZInputStream.read(Unknown Source)
	at net.filebot.media.ReleaseInfo.lambda$resource$18(ReleaseInfo.java:493)
	at net.filebot.media.ReleaseInfo$$Lambda$25/12831537.get(Unknown Source)
	at net.filebot.MemoizedResource.get(Resource.java:36)
	at net.filebot.media.ReleaseInfo.getExcludePattern(ReleaseInfo.java:358)
	at net.filebot.media.ReleaseInfo.getClutterFileFilter(ReleaseInfo.java:407)
	at net.filebot.media.MediaDetection.getClutterFileFilter(MediaDetection.java:87)
	at net.filebot.cli.CmdlineOperations.getSubtitles(CmdlineOperations.java:682)
	at net.filebot.cli.CmdlineOperations.getMissingSubtitles(CmdlineOperations.java:799)
	at net.filebot.cli.ScriptShellBaseClass.getMissingSubtitles(ScriptShellBaseClass.java:359)
Failure (°_°)
Any ideas? Thanks!
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FB stopped working, Java Heap Out of Memory

Post by rednoah »

Some workloads may need more memory than others. You may think that you're giving FileBot -Xmx256m but according to the output you most clearly are not.

export JAVA_OPTS=-Xmx256m is obviously not meant to be passed as a command-line option...

Code: Select all

Argument[1]: File does not exist: /usr/syno/synoman/webapi/export
Argument[2]: File does not exist: /usr/syno/synoman/webapi/JAVA_OPTS=-Xmx256m
JAVA_OPTS is a ENVIRONMENT VARIABLE that you need to set before calling filebot:

Code: Select all

export JAVA_OPTS=-Xmx256m
filebot -script fn:sysinfo
:idea: Please read the FAQ and How to Request Help.
stooovie
Posts: 15
Joined: 16 Sep 2013, 09:38

Re: FB stopped working, Java Heap Out of Memory

Post by stooovie »

Your code gave me this:

Code: Select all

FileBot 4.7.2 (r4178)
JNA Native: 4.0.1
MediaInfo: 0.7.83
Apache Commons VFS: [zip, rar]
Chromaprint: java.io.IOException: Cannot run program "/usr/local/chromaprint/bin/fpcalc": error=2, No such file or directory
Extended Attributes: OK
Script Bundle: 2016-11-07 (r458)
Groovy: 2.4.7
JRE: Java(TM) SE Runtime Environment 1.8.0_91 (headless)
JVM: 32-bit Java HotSpot(TM) Client VM
CPU/MEM: 2 Core / 247 MB Max Memory / 9 MB Used Memory
OS: Linux (arm)
Package: SPK
Data: /volume1/@appstore/filebot/data/admin
uname: Linux Synology 3.10.77 #8451 SMP Wed Nov 9 13:44:39 CST 2016 armv7l GNU/Linux synology_armada38x_ds216j
Done ヾ(@⌒ー⌒@)ノ
stooovie
Posts: 15
Joined: 16 Sep 2013, 09:38

Re: FB stopped working, Java Heap Out of Memory

Post by stooovie »

Setting the limit to 200 MB with a command separate from the script and replacing "Action duplicate" with "Action move" seemed to work. Thanks!
Post Reply