Application with log4j causes perm gen leak across redeployments

Solution Unverified - Updated

Environment

  • JBoss Enterprise Application Platform (EAP)
  • log4j

Issue

  • Our application has log4j bundled in it. After redeploying this app several times, we hit a perm gen OOME. The heap dump shows many of the application classloaders persisted by a still running log4j PropertyWatchdog or FileWatchdog thread.

Resolution

Root Cause

Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.