java.lang.OutOfMemoryError: Java heap space error

Why am I getting this and how can I correct it?

Symptoms

IBM Product Master becomes inaccessible with an OutOfMemoryError exception.

Causes

The java.lang.OutOfMemoryError: Java heap space message occurs when there is not enough memory left for storing the object in the heap space.

Resolving the problem

Refer to the following to correct this error:
  • Try increasing the memory size for service causing the problem gradually by 1 GB in the $TOP/bin/conf/service_mem_settings.ini file and find the optimum service memory size to be used.
  • If any transaction involves large dataset, then do such transaction in batches.