Open MaximMoinat opened 3 years ago
A quick solution is to increase the amount of memory assigned when running the jar:
In a text editor, open rabbitInAHat.sh (Mac) or rabbitInAHat.bat (Windows) and change the -Xmx
option to a larger value. By default this is 1200m, and for me the issue was fixed when increasing this to -Xmx2400m
.
exec "$JAVACMD" $JAVA_OPTS -Xmx2400m \
-classpath "$CLASSPATH" \
-Dapp.name="rabbitInAHat" \
-Dapp.pid="$$" \
-Dapp.repo="$REPO" \
-Dapp.home="$BASEDIR" \
-Dbasedir="$BASEDIR" \
org.ohdsi.rabbitInAHat.RabbitInAHatMain \
"$@"
The warning is unrelated. Java 11 only warns on certain reflective operations (e.g., changing a private method to public at runtime). In a future Java version, it might prohibit those operations. Sometimes a later version of the library (in this case, json-io) will have fixed the access.
Can you pinpoint in code where the large object is written? It may help to write the object in streaming style rather than collecting the whole dataset in a single object and then write it to disk.
@blootsvoets The out of memory error is thrown upon creating a string object (json representation of the model). https://github.com/OHDSI/WhiteRabbit/blob/172f8c30c9b252cdf063ef38289156e709aaa3d9/rabbitinahat/src/main/java/org/ohdsi/rabbitInAHat/dataModel/ETL.java#L137-L139
And som other warnings about illegal operations: