-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Jan,
On 6/27/13 5:17 PM, honyk wrote: > On 2013-06-27 Christopher Schultz wrote: >> On 6/27/13 4:31 PM, honyk wrote: >>> I am constantly encountering PermGen errors despite quite high >>> PermGen limit (even 512m) and many options set - approx once a >>> week under not heavy load. >> >> Like what kinds of options? What kind of load? What does the >> error look like? Are you re-deploying your webapp without >> restarting Tomcat, or do you bust PermGen even with a single >> deployment? > > Tomcat runs as service using these Java opts (tomcat7w.exe) - > single line > > -Duser.language=en -XX:MaxPermSize=512m -XX:+DisableExplicitGC > -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled > > Originally I used Apache JkMount/Worker to hide that port number. > In that case there were listed these errors in the tomcat err log: > Exception in thread "ajp-bio-8009-exec-7" > java.lang.OutOfMemoryError: PermGen space I recommend that you run with -XX:+HeapDumpOnOutOfMemoryError and possibly also with -XX:HeapDumpPath=[path to where you want your heap dumps to go]. If/when your service busts PermGen, you should be able to inspect the dump and see what all the java.lang.Class objects are. I suppose it's possible that you have a lot of intern'd String objects as well (if you are on Java 1.6 or lower... you didn't say), but it's usually java.lang.Class objects. > Now I use proxypass like this (hoping this is preffered way): > ProxyPass /my-app ajp://localhost:8009/my-app > > and in this case I can see just Exception in thread > "ajp-bio-8009-exec-4" without any details (but I suppose it is the > same PermGen one) Your choice of connector should not be relevant. Neither mod_jk not mod_proxy_ajp are "preferred"... they each have their own advantages. > I do not hot deploy my apps. They are JSF2.0/Mojarra powered, some > of them access database a generate various reports. Do you use RMI or a lot of proxies? How about JSF and/or Mojarra? Both RIM and Proxy classes end up generating lots of junk Class objects and can fill your PermGen. Given that you already have 512MiB of PermGen, you have obviously changed this from the default. Have you tried raising it up to say 1GiB just to see what happen. It is entirely possible that, for your application, you really just need a whole bunch of PermGen. It's not likely, but it's possible. >>> I am trying to investigate what the app causes this, but I >>> haven't succeeded in reproducing it locally yet. >>> >>> I found several articles about VisualVM (I hope it could help >>> me to determine some PermGen issues) and connecting it to the >>> Tomcat. Remotely. But I have no clue how can I conect the local >>> VisualVM to tomcat that runs on localhost. >>> >>> Even here it is written: >>> http://tomcat.apache.org/tomcat-7.0-doc/monitoring.html >>> >>> Enabling JMX Remote Note: This configuration is needed only if >>> you are going to monitor Tomcat remotely. It is not needed if >>> you are going to monitor it locally, using the same user that >>> Tomcat runs with. >>> >>> But there is no further description for that simpler (local) >>> method. If it is obvious, sorry, but I am lost here ;-) >> >> Connecting to a Tomcat running on localhost is dead simple: >> >> 1. Launch VisualVM 2. Once the main screen loads, double-click on >> "Tomcat" from the "Local" cluster of applications 3. Profit > > Now I've found this interesting article: > https://blogs.oracle.com/nbprofiler/entry/monitoring_java_processes_running_as > > I realized that my tomcat runs as a service but I am logged as an > user and in this case the tomcat is not visible to me. I'll test it > differently tomorrow. Try running VisualVM as an administrator. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJRzZVaAAoJEBzwKT+lPKRYvYYQAMB3XYAmxbOawBA22foHRrDZ UROJRujWEPsOrPOrjq6UiMidK7F73hhDsejx1YTBUUyXM6NtCmt8yAP1TWdc0VcT 7qI1Q0HsyHeYpbjd5gHTsJYkoVK2abD8cQAnxgbns8PxlDaaUvdqnRcA4wLJVCzK Cw7ghoH9z5Yltbww5Mqne/pb9drXJoq02XUdbrEV4gejqK7t8Ow8OsSo4/izlG2k 08qu+PZ9UNYRt0Dihpx8QflLqv9Xu5HfpUwVWTRE5+uQgc0AaAExxR60xqAoYRL8 +YIi72JWiXWrQkceHDvSnP4w+SM8DfhI/SQtqMzJNoBIbbAgIMckqqm4LI+ngY+w eJa/wc/d6R186PTzT2Sd1TmiWDWLdw/CqSTOoXE7fryMthJiovxtvmhTrLsrwoKL WkbOTtXTPQduk8A1FHh/Y08ByGKNfwEapkQCsVidQyDmq2Y7Yrsb5cYYF5JiHFc6 tsqU6H+h5EAMPr0Nslt2WHyDIjFtZoIsn0hCNJ3CUAX9BUSyTQapP9TLxGxqN/Vo Ihykp2jtufQ2pEZkFZb3mE08CvX6ihdAmC4losvLXGCc5rzulBGr2BhuSTs3IXaF SakWdoj+cvXXtQBtUPTAHxML8inMn3qDit6BB5oBW5VeMQ0FOeemYlDyCjNVf0SA wBddCxlm7mUS0p2dTXCF =0rQS -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org