-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Kaushal,
On 11/28/16 1:09 PM, Kaushal Shriyan wrote: > Hi, > > I am seeing the below PermGen space issue in tomcat catalina.out > file. Currently i am running Apache Tomcat Version 7.0.59 on > CentOS release 6.8 (Final) java -version java version "1.7.0_80" > Java(TM) SE Runtime Environment (build 1.7.0_80-b15) Java > HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode) > > Exception in thread "http-bio-8080-exec-120" > java.lang.OutOfMemoryError: PermGen space Exception in thread > "http-bio-8080-exec-165" java.lang.OutOfMemoryError: PermGen space > > 2016-11-28 13:40:30.543 ERROR 19011 --- [o-8080-exec-110] > o.s.boot.context.web.ErrorPageFilter : Forwarding to error > page from request [/push-notifications] due to exception [PermGen > space] java.lang.OutOfMemoryError: PermGen space > > > Is there a way to debug PermGen space issue and are there any > tools to debug the same. Currently i have set > -XX:MaxPermSize=1024m. How do i determine what value should be set > for MaxPermSize? > > Any help will be highly appreciable. Please do let me know if you > need any additional details. Do you do hot re-deployments? If you do and your application does not unload cleanly, then you can get ClassLoader-pinning leaks. In a dev environment, run your app for a while and then perform a hot-reload, then use Tomcat's manager application to "check for leaks". If your application is still hanging around, it will tell you. If you don't use hot-deployment or you don't find any leaks when you do hot re-deployments, then your problem lies in either of two places: 1. Heavy use of RMI to load classes across the network (java.lang.Class objects for proxies, etc. can lead to PermGen exhaustio n) 2. You just need more PermGen. Frameworks such as Spring are known to require surprisingly-high amounts of PermGen space because of the many java.lang.Class objects loaded by them. If you are under situation #2, my recommendation is simply to increase the PermGen space by a factor of 2 until you stop getting OOME:PermGen errors, then observe the PermGen space after your webapp has been running for a while (maybe a week or two). The current usage of PermGen at that point will be roughly your target. Always remember to leave a little extra space "just in case". - -chris -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJYPPdAAAoJEBzwKT+lPKRYLc8P/ieD4bGjJoBrIMJs3Frdjh9W r3lPfltFgzYEWfu0MYhfs26bXG0Ivk23w614WZbw70otNB+x25bqdxp+yRsHBVmg jQxPt4+olXJqsHRQU2rQbLSkHbN+UWp5UYlbMUzM8uGFl6kGkK6vFeOMPmd9a50Z WE6LGVkqAJSEJivYPqkAmldiT8r3QoR3cjB5sSwHaPs8Hjp2uQCZVMATScC5Daz7 /3lLu89a6VG2sKctYqYeUeS01FfivXZ6KuHE0df46stTBDYz6KlrDF2yKz2G22Rb dwckx7yYm+lnzrxlUpMv1N3vqZTAOwtqehZ3WS5TiZ4fCCHFwzBYy2/hxWU3hamq Vv0wc9npkJDDQXnCJsOm1vjcekAQwAeJ6KjBVgqpCScv1AK5QH1WYkoDOlC3ovYm BFNKVtIhhhrKhpA2OeyVvEafZ5ZpMpD0u02NJGYr4NXUWFsdsrDxVOEg4zxHUb02 qpM/Vm4U7M3d0aC4g4yVBtutEToBjSAVtXDqB8b8CVILlGzZjhbDlwizqeymcaAM zasObN1q49U8CbBFlSDbNE6T88G14ScxY+IvYJDG9PZNfK1m64cMppbnxRaK60Tn ej1wKGogzMIVkHDLwbLse9BgrkLWOYL9jvXAY17W9Hg0745vmTZluPtmAPJBVylf Xt9lNhwX/qWKTrqKV/Ut =e27x -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org