I have a Mule instance running with numerous RSS Connectors, and I have a service running within the same Mule context that receives RSS feed updates/deletes/additions. When something with a feed changes, that service triggers a hot deploy by touching the Mule config file. That works fine. Mule reloads the context and picks up the changes.
However, every time I do a hot deploy, the class loader reloads almost all classes, almost duplicating the initial PermGen memory footprint every time. Eventually, I run out of PermGen space, and Mule crashes. It doesn't matter how big I make it - every hot deploy demands more space. I'm monitoring this in YourKit, FWIW.
I found some generic information about making servers use shared libraries, instead of loading new ones in every context. I assume what's happening is that each time a hot deploy occurs, a new Mule context is created, and Mule reloads all the classes into the new context instead of using the ones that were already loaded.
How can I do multiple hot deploys without running out of PermGen?
Thanks!