How to Correct A java.lang.OutOfMemoryError: PermGen space Error
PermGen space is Java’s fixed block of memory for loading class files and it is most likely getting exceeded.
Use the following steps to increase the atom's memory:
- Stop the atom or molecule.
- Navigate to <atom_or_molecule_installation_directory>\bin.
- Open the atom.vmoptions file a text editor such as Notepad.
- Change -Xmx512m to -Xmx1024m.
- Save the file and restart the atom or molecule
Stop the atom and edit the atom.vmoptions file (that can be found in the atoms bin folder) and add the following line to the end of the file:
Save the file and then restart the atom.
Monitor it for some time. If problems persist, you may need to increase this value again, for example:
Keep in mind though that the standard Garbage Collection (GC) behavior in java is generally to use what is allowed. So if you allocate 768MB to the PermGen space, then the JVM won't invoke its Garbage Collection until there is a need to do so. In an active JVM, you may see a "full" PermGen space regardless of how much space you give it.
Other options include:
- identifying the processes that are experiencing this error and optimizing the process design
- batching the inbound data in smaller amounts
- spreading out process schedules so only one high memory process is executing at a time
- reducing the frequency the high memory process is executing
- adding atoms to execute high memory processes
- upgrading to a molecule
- adding nodes to an existing molecule
You can add this property in the atom_install_dir\bin\atom.vmoptions