...
To solve this edit setenv.[bat,sh] - (or service.bat if you are running as a Windows service) to increase the minimum and maximum heap size via the parameters: -Xmx and -Xms.
...
To solve this edit setenv.[bat,sh] (or service.bat if you are running as a Windows service) to increase the maximum perm size via the paramenter: -XX:MaxPermSize
...