watchdog script to monitor JVM memory usage and clear cache to lower memory usage if needed