GCRC / nunaliit

Nunaliit Atlas Framework
BSD 3-Clause "New" or "Revised" License
46 stars 15 forks source link

nunaliit restore OutOfMemoryError: Java heap space #862

Open ahayes opened 4 years ago

ahayes commented 4 years ago

A restore of a dump containing a doc with a large 719MB attachment is failing with the error Exception in thread "main" java.lang.OutOfMemoryError: Java heap space. This file would have been successfully attached by the uploadServlet, so something is different with our command line restore design.

nunaliit_restore_large_file_stack_trace.txt

ahayes commented 4 years ago

A workaround was to give the nunaliit binary more java heap space. This can be done by running export JAVA_OPTS="-Xmx6g" before the nunaliit restore command.

Also note that nunaliit dump is unaffected.

I think it would still be worth investigating if there is a way to avoid inflating the memory used when streaming large files into couchdb, but it is not urgent at this point.