java.lang.OutOfMemoryError: Java heap space

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
Pulpi
Posts: 22
Joined: 29 Aug 2014, 22:25

java.lang.OutOfMemoryError: Java heap space

Post by Pulpi »

Hello all,

often I got a java heap sprace problem by using FileBot. Hope that anyone can help?
My NAS has 1 GB RAM - how much I can provide for FileBot?

export JAVA_OPTS="-Xmx512m" ???

FileBot sysinfo:

Code: Select all

FileBot 4.8.5 (r6224)
JNA Native: 5.2.2
MediaInfo: 19.09
7-Zip-JBinding: 9.20
Chromaprint: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2019-05-15 (r565)
Groovy: 2.5.6
JRE: Java(TM) SE Runtime Environment 1.8.0_101
JVM: 32-bit Java HotSpot(TM) Client VM
CPU/MEM: 4 Core / 170 MB Max Memory / 13 MB Used Memory
OS: Linux (i386)
HW: Linux DS214play 3.2.40 #24922 SMP PREEMPT Mon Aug 19 12:08:52 CST 2019 i686 GNU/Linux synology_evansport_214play
DATA: /volume1/@appstore/filebot/data/Pulpi
Package: SPK
License: FileBot License PX10772556 (Valid-Until: 2069-12-15)
Done ヾ(@⌒ー⌒@)ノ
FileBot error-log:

Code: Select all

Run script [fn:amc] at [Fri Jan 24 08:28:30 CET 2020]
Parameter: skipExtract = y
Parameter: gmail = *****
Parameter: plex = *****
Parameter: clean = y
Parameter: movieFormat = /volume1/Filme/{ny}/{n.space('.')}{'.'+y}{'.'+ac}{'.'+vf}{'.'+source}{'.'+vc}{'.'+hdr}{'-'+group}
Parameter: seriesFormat = /volume2/Serien/{n}/Season {s}/{n.space('.')}.{s00e00}.{t.space('.')}{'.'+ac}{'.'+vf}{'.'+source}{'.'+vc}{'.'+hdr}{'-'+group}
Argument[0]: /volume1/download
Ignore video extra: /volume1/download/*.mkv 
Input: /volume1/download/*.mkv
Resource not found: https://api.thetvdb.com/search/series?imdbId=tt5606664
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
	at net.filebot.WebServices$TMDbClientWithLocalSearch.searchMovie(WebServices.java:185)
	at net.filebot.web.TMDbClient.searchMovie(TMDbClient.java:88)
	at net.filebot.media.MediaDetection.queryMovieByFileName(MediaDetection.java:951)
	at net.filebot.media.MediaDetection.detectMovie(MediaDetection.java:651)
	at net.filebot.media.MediaDetection.detectMovieWithYear(MediaDetection.java:695)
	at net.filebot.media.AutoDetection$Rules.exactMovieMatch(AutoDetection.java:374)
	at net.filebot.media.AutoDetection$Rule.test(AutoDetection.java:422)
	at net.filebot.media.AutoDetection$Rules.apply(AutoDetection.java:302)
	at net.filebot.media.AutoDetection.detectGroup(AutoDetection.java:213)
	at net.filebot.media.AutoDetection.group(AutoDetection.java:162)
	at net.filebot.media.AutoDetection$group.call(Unknown Source)
	at Script1.group(Script1.groovy:331)
	at Script1.run(Script1.groovy:337)
	at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:64)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:74)
	at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:163)
	at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:37)
	at net.filebot.Main.main(Main.java:132)
Caused by: java.lang.OutOfMemoryError: Java heap space
	at com.ibm.icu.impl.ICUBinary.getByteBufferFromInputStreamAndCloseStream(ICUBinary.java:721)
	at com.ibm.icu.impl.ICUBinary.getData(ICUBinary.java:500)
	at com.ibm.icu.impl.ICUBinary.getData(ICUBinary.java:438)
	at com.ibm.icu.impl.ICUResourceBundleReader$ReaderCache.createInstance(ICUResourceBundleReader.java:189)
	at com.ibm.icu.impl.ICUResourceBundleReader$ReaderCache.createInstance(ICUResourceBundleReader.java:178)
	at com.ibm.icu.impl.SoftCache.getInstance(SoftCache.java:65)
	at com.ibm.icu.impl.ICUResourceBundleReader.getReader(ICUResourceBundleReader.java:233)
	at com.ibm.icu.impl.ICUResourceBundle.createBundle(ICUResourceBundle.java:1308)
	at com.ibm.icu.impl.ICUResourceBundle$4.load(ICUResourceBundle.java:1181)
	at com.ibm.icu.impl.ICUResourceBundle$1.createInstance(ICUResourceBundle.java:92)
	at com.ibm.icu.impl.ICUResourceBundle$1.createInstance(ICUResourceBundle.java:89)
	at com.ibm.icu.impl.SoftCache.getInstance(SoftCache.java:65)
	at com.ibm.icu.impl.ICUResourceBundle.instantiateBundle(ICUResourceBundle.java:1168)
	at com.ibm.icu.impl.ICUResourceBundle.access$600(ICUResourceBundle.java:35)
	at com.ibm.icu.impl.ICUResourceBundle$4.load(ICUResourceBundle.java:1229)
	at com.ibm.icu.impl.ICUResourceBundle$1.createInstance(ICUResourceBundle.java:92)
	at com.ibm.icu.impl.ICUResourceBundle$1.createInstance(ICUResourceBundle.java:89)
	at com.ibm.icu.impl.SoftCache.getInstance(SoftCache.java:65)
	at com.ibm.icu.impl.ICUResourceBundle.instantiateBundle(ICUResourceBundle.java:1168)
	at com.ibm.icu.impl.ICUResourceBundle.access$600(ICUResourceBundle.java:35)
	at com.ibm.icu.impl.ICUResourceBundle$4.load(ICUResourceBundle.java:1205)
	at com.ibm.icu.impl.ICUResourceBundle$1.createInstance(ICUResourceBundle.java:92)
	at com.ibm.icu.impl.ICUResourceBundle$1.createInstance(ICUResourceBundle.java:89)
	at com.ibm.icu.impl.SoftCache.getInstance(SoftCache.java:65)
	at com.ibm.icu.impl.ICUResourceBundle.instantiateBundle(ICUResourceBundle.java:1168)
	at com.ibm.icu.impl.ICUResourceBundle.access$600(ICUResourceBundle.java:35)
	at com.ibm.icu.impl.ICUResourceBundle$4.load(ICUResourceBundle.java:1211)
	at com.ibm.icu.impl.ICUResourceBundle$1.createInstance(ICUResourceBundle.java:92)
	at com.ibm.icu.impl.ICUResourceBundle$1.createInstance(ICUResourceBundle.java:89)
	at com.ibm.icu.impl.SoftCache.getInstance(SoftCache.java:65)
	at com.ibm.icu.impl.ICUResourceBundle.instantiateBundle(ICUResourceBundle.java:1168)
	at com.ibm.icu.impl.ICUResourceBundle.getBundleInstance(ICUResourceBundle.java:1141)

Clean clutter files and empty folders
Finished without processing any files
Abort (×_×)
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: java.lang.OutOfMemoryError: Java heap space

Post by rednoah »

1.
You're trying to process a file literally called *.mkv (and not all mkv files) for some reason. This is a user error, likely to be unrelated to the memory issue though.


2.
The Java process is limited to 170 MB of memory. It's not too little, but on the lower end for heavy amc script tasks. You could try increasing the limit. See other threads for details.
:idea: Please read the FAQ and How to Request Help.
Pulpi
Posts: 22
Joined: 29 Aug 2014, 22:25

Re: java.lang.OutOfMemoryError: Java heap space

Post by Pulpi »

I have replaced the name of the mkv so it´s not for all the mkv files ;)

Second point is the solution I guess, but how much I can provide for FileBot? My NAS has only 1 GB RAM.
rednoah wrote: 26 Jan 2020, 07:12 1.
You're trying to process a file literally called *.mkv (and not all mkv files) for some reason. This is a user error.


2.
The Java process is limited to 170 MB of memory. It's not too little, but on the lower end for heavy amc script tasks. You could try increasing the limit. See other threads for details.
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: java.lang.OutOfMemoryError: Java heap space

Post by rednoah »

I'd try with -Xmx512m then.

:arrow: viewtopic.php?t=6093#p35135
:idea: Please read the FAQ and How to Request Help.
Pulpi
Posts: 22
Joined: 29 Aug 2014, 22:25

Re: java.lang.OutOfMemoryError: Java heap space

Post by Pulpi »

Seems to work now :-)
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: java.lang.OutOfMemoryError: Java heap space

Post by rednoah »

FileBot r7265 adds the -no-index which greatly reduces CPU and RAM usage, at the expense of some higher level auto-detection features.
:idea: Please read the FAQ and How to Request Help.
Post Reply