Tuesday, December 4, 2007
Alfresco and the Mysterious "OutOfMemoryError: PermGen space"
When starting Alfresco after making changes to the .war
file, it appears to start and it is possible to access the login page and log in, but all other actions result in a server error. The error logs then contain messages like this:
09:25:01,313 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco].[jsp]] Servlet.service() for servlet jsp threw exception java.lang.OutOfMemoryError: PermGen space
Solution: explicitly specify an amount of memory which can be used with e.g. -XX:PermSize=128m
as a server option. Under Linux etc. this can be added to the JAVA_OPTS
setting in the alfresco.sh
script, if this is being used to control the application server.
Posted at 8:57 PM |Comments (2)
I ended up using MaxPermSize and setting it to 512m
example: -XX:MaxPermSize=512m
No more out of memory errors after that.