Java "OutOfMemory: permgen" errors on Windows install
Ignite is not monitoring some/all of my database instances, and I see "out of memory" errors for something called "permgen" in the Ignite logs. This article explains what this means and what you can do about it.
Background
According to Sun, it appears to be either a memory bloating issue, or a bug in permanent generation garbage collecting, or perhaps both.
Fixes are documented in 1.5.0.23.5 (and up) and 1.6.0.19.6 (and up). The 1.6 fix is in the “for business” release, so it is not clear that it is in the free version, but we are hopeful that they’ve rolled this fix into the later versions (1.6.0.20 and higher).
Perm Gen space typically defaults to 64m, but it can be increased using –XX:PermSize=128m (or higher).
Solution
The following steps should resolve this issue:
- Install JDK 1.6.0.20 or higher
- Download and install the JDK
- Make a copy of <Ignite Home>\iwc\tomcat\ignite_config\java_loc.txt
- Update java_loc.txt with the full path including the java executable for the newly-installed JDK
Note: java_loc.txt will override any system setting to JAVA_HOME for Ignite only when it’s started or shutdown.
- Increase permanent generation size to 128m, for the Ignite PI Service, you will need to edit the registry.
- As the same user that installed Ignite, open a Command Window from the Start menu
- At the command prompt, enter> regedit
- Navigate to the following 'Options' in regedit:
HKEY_LOCAL_MACHINE>SOFTWARE>Wow6432Node>
Apache Software Foundation>Procrun 2.0>IgnitePI>Java>Options
.jpg)
d. Open up the Option and at the bottom of the list, insert this line:
--XX:MaxPermSize=128m
e. See Example below:

- Click OK and then exit out of regedit.
- Restart the Ignite PI Service
- Select Start Menu > Control Panel > Administrative Tools > Services
- Look for the service, "Ignite PI Server" and stop/start or restart it.
Verify Permgen Changes
To validate that the changes were made, you will need to bring up jconsole. This section describes how to bring up jconsole, connect and verify the changes.
- Bring up jconsole
- In Windows Explorer, navigate to <ignite dir>\Ignite PI\iwc\jre\bin
- Locate jconsole.exe and run it.
- In a screen, like the example below, choose the 'Remote Process' button and enter the following connection string:
service:jmx:rmi://localhost:11099/jndi/rmi://localhost:11099/idc
.jpg)
- After connecting, select the memory tab and choose the "Memory Pool Perm Gen" setting in the drop down box:

- Check the "Max:" setting at the bottom of the screen. It should be set at 131,072 kbytes.
When Upgrading Ignite or Re-creating the Ignite Service
It is important to know that if you upgrade Ignite to a new version, or if you recreate the Ignite PI service by running the createWindowsService.bat in Ignite's install directory, these changes will be lost and you will have to reapply the MaxPermSize settings.
Considerations
If you can’t immediately upgrade to the new java version, try increasing the PermSize to 128m as this may allow more time between the fatal errors. Also, consider stopping/starting Ignite on a weekly basis so to reduce the chances of getting memory errors. Another way to reset Ignite without a regular schedule, may be to query the heartbeat parameter in conprm periodically. If the heartbeat hasn’t changed in some interval of time, then stop / start Ignite again.