How My Server Recovered from OutOfMemoryError: Java heap space

In case this could help someone…

When Yacy would not boot, because of the error:
java.lang.OutOfMemoryError: Java heap space

This got it running again, on a server with RAM: 5.8 GiB. If your server has less RAM, you might now want to try this, but most machines probably have more than this amount of RAM now, right?

export JAVA_TOOL_OPTIONS="-Xms1g -Xmx3g"
java -Xms1g -Xmx3g -classpath "lib/*:." net.yacy.yacy

After awhile of running, seeing that Yacy was working, I pressed CNTRL+C and restarted it with:

export JAVA_TOOL_OPTIONS="-Xms1g -Xmx3g"
./startYACY.sh