tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Facing Memory leak - 64 bit Tomcat 6.0.35 with windows 2008 R2(64 bit JVM 1.6.0_33)
Date Wed, 05 Sep 2012 18:18:43 GMT
Hash: SHA1


On 9/5/12 1:17 PM, Tim Watts wrote:
> On Wed, 2012-09-05 at 12:16 -0400, PJ Delsh wrote:
>> Shailendra,  I'm not an expert, but when we had this same issue,
>> we increased the Initial Memory Pool and Maximum Memory pool (XMS
>> and XMX) in the Tomcat Monitor in Windows 2008.We also had a leak
>> in some of our JSP files that was causing Tomcat to hang several
>> times during business hours.  We configured Tomcat so that
>> VisualVM (which comes with the Java JDK) could monitor Tomcat
>> memory usage.  Then we took heap dumps, and analyzed them for
>> leaks (Shallow Heap vs Retained Heap) using Eclipse Memory
>> Analyzer.  Once we fixed the leaks, Tomcat was stable.In the
>> interim, if you have Tomcat running as a service in Windows,
>> under the Recovery tab set the Tomcat service to restart 
>> automatically if it does stop.  But if you have memory leaks,
>> the Tomcat service probably will still be running but it won't
>> be responding.You can also install more than one Tomcat on the
>> same server, so if one goes down, the other will still be
>> running.  You would also have to configure Apache (or whatever)
>> to work with more than one Tomcat.We also had issues with the
>> Tomcat service crashing (eg Terminated Unsuccessfully) on
>> Windows.  After months of searching, we think the issue was
>> having system.exit(0) in our code.
> System.exit(0) is the very definition of successful termination
> although it certainly doesn't belong in your webapp's code.


>> The truth is that Tomcat is not written well enough to run on 
>> Windows.
> What rot.  All the problems you mention above you traced back to
> your application.  Yet your conclusion is that Tomcat doesn't run
> well on Windows.  Really?

Tomcat runs very well on Microsoft Windows. Poorly-written
applications will fail under any environment.

In the OP's case, I really believe the only problem is that the heap
is too small when moving from a 32-bit to a 64-bit JVM, but we can't
seem to get s response from the OP so I guess we'll never know.

>> See what you can do to move your app to Linux.  You will find
>> many more Tomcat experts on Linux than on Windows.
> I myself have a strong preference for Linux but for reasons
> unrelated to Tomcat.  In reality, you'll find that most Tomcat
> experts don't give a rat's hiney which OS it runs under.  But they
> may care which JVM you're using.

I'm another Linux supporter and I'd hate to run Microsoft Windows as a
server in general, but if you're stuck with it, Tomcat isn't going to
be the problem.

>> Tomcat is not like IIS.
> True.
>> Developing for Tomcat on Windows is fine, but running production
>> apps in Tomcat on Windows is a bad idea.  I wish this was more
>> widely known and publicized.-PJ
> Total BS.

Agreed. PJ: care to cite any "widely known and publicized" references?

Also, PJ, what makes you think that your experiences are anything like
the OP's? You seem to be spouting "solutions" to problems that you do
not understand. When the reported problem is "we are getting OOMEs",
the solution is not automatically "you should switch to Linux because
Tomcat sucks on Windows". It's inaccurate advice (Tomcat works find on
Windows) and is very unlikely to solve the problem (whatever it is).

- -chris
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message