Hi Jon -----Original Message----- From: Moore, Jon, Vodafone UK [mailto:jon.mo...@vodafone.com] Sent: Thursday, October 20, 2016 6:00 AM To: users@tomcat.apache.org Subject: java.lang.OutOfMemoryError: PermGen space
> I have a problem where our customers application server stops > working intermittently and when we check the Tomcat logs we get the > message " java.lang.OutOfMemoryError: PermGen space" but the Tomcat > service is still running, and we have to restart the Tomcat service. I > am a complete novice when it comes to Tomcat but am expected to > resolve this issue as this server is part of the Avaya telephony > solution. > > I have 2 questions please. > > 1 - What would be causing this. In my very limited experience it is likely a "memory leak" in your application "hosted" inside of Tomcat rather than Tomcat itself. You will need to debug your application. I went through something very similar starting in July 2016, starting off as a complete newbie. See threads relating to "OutOfMemoryError: PermGen space" for the whole sorry affair. :-) > 2 - What are the default Java memory settings for Initial memory pool, > maximum memory pool size and thread stack size when the fields are > blank when you use the "Configure Tomcat" interface on Windows. I was > wondering if changing one or more of these settings would help ? FWIW, I agree with the other folks saying not to alter these settings as the solution to solve your problem. If you have a memory leak, increasing the size of the memory will not stop the leak. I suggest following a path that was recommended to me. Start by reading this: http://markmail.org/message/fcbvwapt6afyndxn > 1. Find an app that you can't reload without OOME. > 2. Get a profiler [...] > 3. Reload you app once. > 4. Use the profiler to look for instances of WebappClassLoader. > 5. Look for the one with the started attribute == false. > 6. Trace the GC roots for this instance. In the process, I learned how to perform a Java "heap dump" and how to use a memory analyzer. FYI, I used Eclipse Memory Analyzer (free) to track things down. This will be a learning experience for you too. ;-) > We are running Tomcat 6.0.26 on Windows Server 2008 R2 standard and > JVM version is 1.6.0_20-b02 Thanks for providing those details. :-) We had almost the same setup as you, but Win2012 instead of 2008. FYI, upgrading from Java 6 to 8 did not fix my memory leak. Good luck, and let us know your progress! -- Cris Berneburg CACI Lead Software Engineer --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org