How to troubleshoot memory problems

http://wiki.customware.net/repository/display/ATLASSIAN/How+to+troubleshoot+memory+problems

http://forum.springsource.org/showthread.php?45357-OutOfMemoryError-PermGen-space

Troubleshooting Memory Problems

Reported Problems

1. java.lang.OutOfMemoryError: Java heap space

Confluence is allocated a certain amount of memory (by default Confluence Standalone is allocated 256MB)used by JVM.In many cases,user complains that Confluence halts when performing some actions(e.g backup) or Confluence stops responding suddenly. This might due to Confluence has run out of allocated memory. Hence, you should ask for log files and examine the stack trace if there are any errors/exceptions regarding out of memory:

Error:

Exception in thread "Timer-0" Exception in thread "DefaultQuartzScheduler_QuartzSchedulerThread" java.lang.OutOfMemoryError: Java heap space
Exception in thread "Timer-1" java.lang.OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: Java heap space

2007-01-31 12:41:10,917 ERROR [atlassian.confluence.util.XWorkTransactionInterceptor] onThrowable Invoking rollback for transaction on action '/pages/doeditpage.action (EditPageAction.doEdit())' due to throwable: org.springframework.dao.DataAccessResourceFailureException: Could not create Oracle LOB; nested exception is java.lang.OutOfMemoryError: Java heap space
org.springframework.dao.DataAccessResourceFailureException: Could not create Oracle LOB; nested exception is java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space

2007-01-31 12:41:10,920 ERROR [springframework.orm.hibernate.HibernateTransactionManager] triggerAfterCompletion Rollback exception overridden by synchronization exception

Out of memory might also be caused by plugin activity. This is because a plugin needs certain amount of memory to load its classes. you should also ask if customer has installed any plugins recently.

Solution:
You may ask customer to give a try to:

  1. Increase Java memory
  2. Removal of identified plugin.If this is a third party plugin and customer wish to use it, this may required customer to contact the plugin author(via the plugin home page)

2. java.lang.OutOfMemoryError: PermGen space

If the above error is seen in the logs or stack trace, it is usually related to running out of Permanent Generation Memory that usually caused by multiple application running in the Web Application server (Tomcat)

Solution:
Increase the PermGen size by following the steps outlined here.





你可能感兴趣的:(How to troubleshoot memory problems)