Home / Companies / Rollbar / Blog / Post Details
Content Deep Dive

How to Fix OutOfMemoryError: Permgen Space Exceptions in Java

Blog post from Rollbar

Post Details
Company
Date Published
Author
-
Word Count
550
Company Posts That Month
2
Language
English
Hacker News Points
-
Post removed?
No
Summary

A java.lang.OutOfMemoryError: PermGen Space error occurs in Java when the PermGen area of the heap, which stores metadata such as class declarations and method bytecode, is exhausted due to an excessive number of classes or large classes being loaded. Java's memory is divided into various regions, including Young, Tenured, and PermGen, and the default sizes for these regions can be adjusted using JVM arguments like -XX:PermSize and -XX:MaxPermSize to prevent this error. An example of this error can occur when a loop loads a vast number of classes using a library like javassist, filling the PermGen space. Solutions include increasing the PermGen size and analyzing heap dumps to identify and minimize problematic objects. Additionally, tools like Rollbar offer automated Java error monitoring, helping developers manage and resolve such issues more effectively.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Real-time 1 715 280 93 -14%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.