-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 George,
On 9/16/2010 12:12 PM, George Sexton wrote: > I don't think my webapp is leaky. Things like file handles, db > connections, all stay pretty constant. That's good to know. > I do have undeploy/re-deploy's of virtual hosts periodically. Maybe > around 30 per week. Perhaps that's where the issue is. I did dumps > using JMap after undeploying my webapp and can see that there are no > objects remaining allocated after the undeploy. What about instances of java.lang.Class? If your WebappClassLoader won't go away, neither will all those class objects. With lots of reloads and/or lots of classes per webapp, this can cause OOMEs after some time. > I'm running 300+ virtual hosts per machine, and around 300,000 hits > per day per host. How many webapps do you have deployed (including double-deployments for different <Host>s)? > It looks to me like the memory just gets fragmented and eventually > things fail. I can run around 3 weeks before a machine crashes, so > around 6-7 million hits. I'm not sure what you mean by "fragmentation"... the JVM does a pretty good job of managing memory and preventing fragmentation. The number of hits shouldn't be significant, unless you have a leaky process somewhere. If you are doing lots of webapp redeployments, that could be the problem. Note that the problem is in the webapp, not in Tomcat. One potential problem is that Tomcat does not release JNDI DataSource objects during a webapp redeploy. I haven't checked if it creates a new one and just leaves the old one laying around in memory... I think it might just re-use the old one or something like that. I'll have to look back into that. > Another problem (at least w/ JDK 1.6.0.20) was that on one machine, > with 4GB allocated, the garbage collection of the OldGen space would > start to take a REALLY long time. Say 3-8 minutes. That's on a dual > 2-core XEON 2.66Ghz CPU's. JDK 1.6.0.21 seems to have improved that. Is that a 4GiB heap, or a 4GiB old generation? You should start a new thread with your situation and let us take a crack at it: you ought to be able to run forever without a JVM restart. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkySSvMACgkQ9CaO5/Lv0PAP6ACfegYR9uqRvQEM4zKldRw1A+sU 7JcAoIJAZrSjH28L+9GAqN7nm0Q8MlLK =oPN8 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org