Out Of Memory Error while trying to use filter-media command

334 views
Skip to first unread message

Salony Permanand

unread,
Nov 21, 2023, 4:39:49 AM11/21/23
to DSpace Community
Hello Everyone,

I am using Dspace version 7.6

I created collections and imported items using zip.

In each item , I have 3 pdfs attached having size 100-200 MB

I am trying to add thumbnail and full text indexing using filter-media command

But I am getting "OutOfMemoryError !!!Exception in thread "main" java.lang.OutOfMemoryError: Java heap space in dspace filter-media"

Attaching below scrnshot of error

Please if anyone knows any solution, then explain
Screenshot from 2023-11-21 15-08-25.png

sye...@gmail.com

unread,
Nov 23, 2023, 8:36:08 PM11/23/23
to DSpace Community
Handling random PDFs is very error prone. The PDFs may be subtly broken or very large. 

On DSpace 6 we use command lines like:

JAVA_OPTS=-Xms312M -Xmx2000M nice /rep1/dspace/bin/dspace filter-media ....

The "JAVA_OPTS=-Xms312M -Xmx2000M" portion allocates more than the default memory to the process.

The "nice" portion lowers CPU priority.

cheers
stuart

Andrew K

unread,
Nov 24, 2023, 9:58:30 AM11/24/23
to DSpace Community
Hi Salony,
You can try  textextractor.use-temp-file and other parameters
I also increased in JAVA_OPTS="-Xmx512M -Xms64M -Dfile.encoding=UTF-8" both parameters to 2048M for the filtering. And it helped.
WBR,
Andrew
вівторок, 21 листопада 2023 р. о 11:39:49 UTC+2 Salony Permanand пише:
Reply all
Reply to author
Forward
0 new messages