Restarting openfire every morning

Every morning I have to start openfire and it stopped sometime during the night. I do a /etc/init.d/openfire stop and start.
Openfire is 3.5.1 with elastix 1.1.7.

I read through this discussion on openfire’s website, http://www.igniterealtime.org/community/message/176668 and went through all the suggestions.

Can anyone please advice and let me know of a solution that worked for them?

I have answered in the linked thread.

found a solution on another forum in elastix.org, http://www.elastix.org/index.php?option=com_fireboard&Itemid=55&func=view&id=937 7&catid=3&limit=6&limitstart=0. This worked for me and other mentioned in the linked url forum.

In the file

/etc/init.d/openfire

there is a line, add the bolded part to the line

#Lastly, prepare the full command that we are going to run.
OPENFIRE_RUN_CMD="${JAVACMD} -Xmx512m -server ${OPENFIRE_OPTS} -classpath "${LOCALCLASSPATH}" -jar "${OPENFIRE_LIB}/startup.jar""

Reboot and try again