Extreme Slowness - Out of memory issue observed
SummaryFrequently observed the java exception with Pega 7.2.
Error Messagesjava.lang.OutOfMemoryError: PermGen space.
Steps to ReproduceNot Applicable
Root CauseDirectStreamEncoder within PRPC represents the serialized version of a Clipboard Page.
ResolutionHere is the explanation:
Add prconfig entry below (recycle JVM) which resets the DirectStreamEncoder object’s contents before returning the instance to the pool, that is, all ArrayList and byte references are reset to their default size like 8 for ArrayList and 1024 for byte.
Otherwise with the current state, the memory footprint can grow depending on the size of clipboard pages loaded concurrently.
The corresponding clipboard page may not be in use anymore but the encoder will continue to exist until picked again (and the new size corresponds to the new clipboard page being loaded). This non-default DirectStreamEncoder size in memory has no impact on the performance with clipboard page operations, so use setting below to maintain a low referenced or live object memory footprint:
<env name="clipboard/encoder/poolConfig" value="reset-contents" />
Published April 22, 2017 - Updated May 16, 2017