Inside my webapplication, for every 5 minutes I am running bash scripts scheduled under crontabs.
And my script looks this way
cd /opt/glassfish4/glassfish/domains/domain1/applications/TradeOnlineChat/WEB-INF/classes/
JAVA_HOME=/usr/lib/jvm/jre-1.7.0-openjdk.x86_64
$JAVA_HOME/bin/java -Dlog4j.configuration=file:/opt/glassfish4/glassfish/domains/domain1/applications/TradeOnlineChat/WEB-INF/classes/log4j.properties -cp .:/opt/glassfish4/glassfish/domains/domain1/applications/TradeOnlineChat/WEB-INF/lib/* com.util.Utils
Sometimes i am getting the following error inside my logs and the result is that the script doesn't update the data
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could you please tell me how to resolve this error.