Tomcat has got that well-known memory leak problem that causes PermGen space errors after too much redeploying.
What I'd like to know is best practices to reload the server in a way that completely resets that space and erases existing memory leaks. Just using shutdown.sh and startup.sh isn't cutting it: it seems that leaked memory stays leaked. Rebooting the machine works of course, but I'd like to know if a quicker/cleaner/safer solution exists.
Thanks!
(I can allocate more PermGen space, of course, but that's just delaying the problem, and I'd like to flush away the leaked memory before I declare the apps as production-ready, since I'm changing jobs afterwards and thus the apps won't get redeployed for a while)
EDIT: as mentioned in the comments below, it seems the scripts are supposed to flush all memory already since they create a new JVM, so there must be some other factor causing PermGen errors to keep happening even in a new JVM, after many redeploys.