andrel
andrel

Reputation: 1154

Tomcat runs out of PermGen space, even with a lot of PermGen space reserved

Running Tomcat fails with java.lang.OutOfMemoryError-errors related to lack of PermGen space.

I recently changed Tomcat to run as its own user (not root).

I have tried increasing the PermGen size in CATALINA_OPTS to 512MB and 1024MB, but it does not seem to have any effect.

I have also ruled out ulimit limitations by (temporarily) giving the user the same limitations as the root user has.

Upvotes: 0

Views: 84

Answers (1)

andrel
andrel

Reputation: 1154

The solution turned out to be lack of disk-space.

Tomcat and our application log/configuration files were on a partition that was almost completely full.

As the partition grew to completely full, our logging framework started throwing IOExceptions on attempts to write to the log files (rather than PermGen faults). The IOEXceptions gave me the hint i needed to solve the issue) Running df showed that the partition were completely full.

Moving the log files to another partition solves the problem and lets us run Tomcat as it's own (non-root) user.

Upvotes: 0

Related Questions