Techniques are described for tuning a Java Virtual Machine (JVM) in an automated manner. The automated tuning may be performed to improve a JVM's performance including to prevent it from failing. An auto-tuning system is described that can auto-detect one or more anomalous conditions for a JVM, and in response, take one or more corrective actions to auto-tune the JVM to avoid or reduce/mitigate any adverse impacts of the detected anomalous conditions. A corrective action taken for a JVM may include changing one or more parameters associated with the JVM.