Hi team,

I'm working on fixing "OutOfMemoryError: PermGen space", that is caused
by class loader leak of Roller. Fixing of this will improve development
and deployment process. For example, We won't need restart Tomcat every
time we see that error, Also it enables rolling update (zero-downtime
deploy) of some modern application containers. It should be beneficial
for users too.

I've fixed some obvious causes in recent commits but some problems are
still remained. One of the problems remain is the Finalizer thread of
Google Guice. It keeps running after Roller is undeployed with strong
reference to classes that loaded by WebAppClassloader of Roller. Here's
detailed information: https://github.com/google/guice/issues/288

I think there are two solutions:

(a) Updating Google Guice to 4.0 (Guice has stopped using Finalizer
thread in that version)
(b) Adding a ServletContextListener based on
https://gist.githubusercontent.com/gissuebot/d6ab8d55d9b6c53f020c/raw/75903663890d0384313f38d46ae01ce7eb884b87/GuiceLifecycleListener.java
.

Personally I prefer (a), but it is a major update so may cause some
compatibilty issue. Also I've confirmed (b) has successfully stopped the
Finalizer thread, but not sure if we really want to add such kludgey
workaround to our codebase.

Which do you think is better? Also other opinion or feedback would be
appreciated.

Kohei

Reply via email to