Hi, >1) If you have a large scale web application with many JSP files, or an >application that will generate a large amount of reflective objects (if it >is using Hibernate for example), the default Permanent Generation and Max >Permanent Generation settings on the JVM are not sufficient. By default >these are 64 megabytes if you use the "-server" option for the JVM. In our >own app, however, when all JSPs are compiled and loaded into memory, >including the tremendous number of classes we have, our Permanent >Generation stands around 150 megabytes! Setting -XX:+PermSize and >-XX:+MaxPermSize to around 200 megabytes solved this particular issue; if
Nice. >2) We were caching a large amount of search objects in each user's session >objects; some of this data wasn't being let go fast enough, causing OOM >issues. While we probably need to refactor this portion of our system >using WeakReferences or something similar, we found a temporary workaround >by setting session-timeout to 1 minute in tomcat/conf/web.xml; this will Not so nice, but you've already pointed out a refactoring is in order. >http://codinginparadise.org/images/outofmemory.png > >If you look at that graph, you will see that our Permanent, Old, and Eden >spaces have more than enough memory. Are we running out of file or thread >descriptors? Is it something outside of the JVM? I think you're on the right track. Use the ulimit command or its equivalent on your system to bump up file descriptors and thread counts allowed for your user. This OOME is not caused by missing space in any of the JVM's memory areas. Yoav Shapira http://www.yoavshapira.com This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
