0

I have deployed my web application under tomcat6 on windows server 2008. In office hours my application needs to respond to a lot of traffic. At that time it seems that the memory consumption of tomcat reaches say 8GB, however even more memory is available in the system, but my application's response time is very low and some times no response.

Is there some way that tomcat should call garbage collector after, say, 6GB memory is consumed?

Aaron
  • 2,968
  • 1
  • 22
  • 36
Ahsan Iqbal
  • 165
  • 1
  • 1
  • 3
  • don't you mean "response time is very high"? – Javier Oct 27 '10 at 12:11
  • Have you set any JVM parameters for the heap such as Xmx, Xms etc at present? – JoseK Oct 27 '10 at 12:24
  • @JoseK: no i didn't do that can u guide what are these parameters and how to set them. – Ahsan Iqbal Oct 27 '10 at 14:08
  • @Javier: sorry i mean it is taking too much time to respond – Ahsan Iqbal Oct 27 '10 at 14:09
  • @JoseK: i have tried what you said, once i have put the limit it works very fine but when it reaches the limit it again have same problem. – Ahsan Iqbal Oct 27 '10 at 16:43
  • @Ahsan: How did you set these? – JoseK Oct 27 '10 at 16:53
  • @ JoseK: i actually install tomcat by win64 installer that also installs a GUI for managing tomcat that gui is called apatche tomcat 6 properties in that gui there is a tab "Java" here we have intial memory pool and maximum memory pool here i have given 0 for minimum and 4 GB for maximum that values. – Ahsan Iqbal Oct 27 '10 at 23:11
  • @Ahsan: I think you should profile your app first to see where the memory consumpion happens. See my response earlier to another question. http://serverfault.com/questions/194736/bench-marking-windows-machine-java-application/194759#194759 – JoseK Oct 28 '10 at 05:23

1 Answers1

0

If you run Tomcat on Windows, you can use the neat "Tomcat Monitor" application that ships with Tomcat (available via the Start menu).

Go to the Java tab. At the bottom, below the "Java Options" textarea, you will find 3 input fields:

Initial memory pool ___ MB
Maximum memory pool ___ MB
Thread stack size _____ KB