Method 1: Using the administrative console
Open the administrative console.
Navigate to Servers > Server Types > WebSphere application servers > <servername>
Navigate to Server Infrastructure > Java and Process Management > Process Definition
Navigate to Additional Properties > Java Virtual Machine > General Properties
Define the values (in MB) for ‘Maximum heap size’ and/or ‘Initial heap size’.
Restart the server.
Note: If the heap size is already low, the administrative console might not open. In such cases, use some other method to configure the heap size.
Method 2: By editing the configuration files
This method should be used with caution.
Search for a file named server.xml in your WebSphere installation.
Generally, the location of this file is as follows:
<profilehome>/config/cells/<cellname>/nodes/<nodename>/servers/<servername>/server.xml
Select the server.xml specific to your server and edit it to add/modify/delete the attributes @initialHeapSize and @maximumHeapSize of the element <jvmEntries> The value of these attributes is the heap size in MB.
For example:
<jvmEntries ... initialHeapSize="2048" maximumHeapSize="3072" ...>
...
</jvmEntries>
Restart the server after saving the changes to server.xml.
References:
https://blakboard.wordpress.com/2013/05/15/how-to-configure-heap-size-for-websphere-application-server/