Perform plugin cleanup in the background
When a plugin is stopped, schedule a Plugin Cleaner task to run
1 minute later to try and clean out the garbage and release the
JAR from $site_path/tmp. If the cleaner doesn't succeed, schedule
again for 1 minute later until it does. Each failed clean attempt
backs off by another minute until it tries once every 15 minutes
(4 times per hour).
Plugins that don't clean are probably still linked into the live
object graph somewhere and cannot be garbage collected. This
indicates a memory leak, and the server administrator may need to
restart the server to free up memory. Leaking should only happen
with badly coded plugins that attempt to manually manage their
listener registrations, or start threads they don't terminate.
Change-Id: I0ca8c2c70b6fd9bcfbb7444ea3995210c9d80c2f
6 files changed