Sean Tong
posted this on Oct 26, 2009 10:01
Overview:
The default setting of JVM should be: -Xmx1024m -XX:MaxPermSize=256m
If the server doesn't have enough memory, this setting should work too: -Xmx512m -XX:MaxPermSize=128m
Troubleshooting:
1. Out of Memory: Perm Gem Space
Solution: set the right XX:PermSize
2. Out of Memory: Heap Space
Possible causes:
a. Max Memory settings is too high. The server doesn't have enough memory for Java to use.
Solution: reduce the settings for -Xmx
b. Max Memory settings is too low. JVM runs out of memory.
Increase the settings for -Xmx
c. Big items in document. JVM trys to load these items into memory (e.g 100M+ item) and runs out of memory.
Solutions: remove these items with large size.
Query (MySQL):
select id, name, char_length(description) from document where char_length(description)
delete from evententry where document in (...);
delete from version where documentId in (...);
delete from document where id in (...);