OutOfMemory Exceptions, WebSphere 6.1

This post has been moved to http://srinichekuri.com/2012/08/30/outofmemory-exceptions-websphere-6-1/


OutOfMemory Exceptions, WebSphere 6.1, Windows Server

One common solution suggested when there are OutOfMemory exceptions is to increase the heap size. There is lot of misconception among developers that maximum heap size can be increased to amount of physical memory on which server is running, but this is not true. A lot depends on the Operating system you are running your server on. In this post I will talk about increasing the heapSize for websphere running on windows.

There are two types of configurations depending on the memory space allocated to Java process in Windows:

Windows (32-bit):
With default configuration:
1.8 GB (Max allowed) – 1.5 GB (Max recommended by IBM)
With 3GB Enabled (Look below for procedure to make this change):
1.8 GB (Max Allowed) – 1.8 GB (Max recommended by IBM)

Window (64-bit) –  Memory allocated for Java process in this setup is pretty large so IBM sets no maximum limit.

Source: http://publib.boulder.ibm.com/infocenter/javasdk/tools/index.jsp?topic=%2Fcom.ibm.java.doc.igaa%2F_1vg00014884d287-11c3fb28dae-7ff6_1001.html


Enabling 3GB in Windows:

  • Right-click My Computer. Click Properties.
  • In the System Properties dialog box, click the Advanced tab.
  • On the Advanced tab, under Startup and Recovery, click Settings.
  • In the Startup and Recovery dialog box, under System startup, click Edit. The Windows boot.ini file will be opened in Microsoft® Notepad.
  • Create a backup copy of the boot.ini file. Note: Boot.ini files may vary from computer to computer.
  • Select the following line in the boot.ini file:
    multi(0)disk(0)rdisk(0)partition(2)\WINDOWS=”Microsoft Windows XP Professional” /fastdetect
  • Press Ctrl+C to copy the line and then press Ctrl+V to paste it immediately below the original line.
    Note: Your text string may be different from the text string in this solution, so be sure to copy the text string from your boot.ini file, and not the text string included here.
  • Modify the copied line to include “ /3GB”, as shown in the following example:
    multi(0)disk(0)rdisk(0)partition(2)\WINDOWS=”Microsoft Windows XP Professional 3GB” /3GB /fastdetect
    Note: Do not overwrite any existing lines.
  • Save and close the boot.ini file.
  • Click OK to close each dialog box.
  • Restart your computer.

During startup, select the 3GB option. If you do not select the 3GB option, the system will default to the 2GB total memory setting.
Note: If problems occur during startup, you may try to resolve the issue by updating some of your drivers.  However, recall the notice at the beginning of this solutions that note all Windows update or hardware and graphics drivers work with the 3GB switch enabled.

Source:  http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=9583842&linkID=9240697