How to clear java Memory?

Hi guys,

We are running on openfire 3.7.0 on a Centos 5 box and most of the client are using Spark 2.6

Originally the java memory was set to its default which was around roughly around 300+ MB

Our server just went crazy yesterday and I suspected that it has something to do with the Java Memory, also as seen on the logs Java Heap etc.

Now was gonna increase the java memory and it gave me a hard time and decided to just reboot the server and the changes had been made…

Anyway, is there anyway to clear the java memory? Because it usually stay constant at a high level, I am planning to do a crontab for it.

Any thoughts on this guys?

not possible.

i have never heard of a command or feature to tell a process to deallocate memory from the outside.

only things to be done is to optimize the code to prevent memoryleaks.

How do you do that Wolf?

http://en.wikipedia.org/wiki/Program_optimization