This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Performance and the fly likes TOMCAT GC Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "TOMCAT GC Issue" Watch "TOMCAT GC Issue" New topic
Author

TOMCAT GC Issue

Paul Wintech
Greenhorn

Joined: Jan 20, 2010
Posts: 2
Hello,

I am new to the Tomcat Administration, I have some 4 production servers running Tomcat6.x with Jdk - To monitor all my applications like Apache,Tomcat and Mysql we are using OPmanager-Application manager tool.

Intermediately i get GC critical alert. That means some times GC collection goes high and remains for more than 10 mins. Then it clears the Grabage. But this is happening recently checked all possible logs found nothing. This is not happening every time, Say like twice in a day.......

Please help me on this issue .

Regards
Paulwintech
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

Welcome to javaranch Paul. Are you seeing this problem in DEV and are you able to replicate ? Using a profiler will give you great benefits. Do you have a GC statistic graph ?


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Paul Wintech
Greenhorn

Joined: Jan 20, 2010
Posts: 2
Hello Deepak,

I am not a DEV, I am an System Admin. Herewith i have attached the MEM Stat for your Reference.

Used Memory
Date Time Min value Max value Hourly Average
in KB in KB in KB
Jan 19,2010 23:00 5,699 39,972 26,633.98        
Jan 19,2010 22:00 31,174 40,024 35,404.55        
Jan 19,2010 21:00 31,072 42,948 37,011.424        
Jan 19,2010 20:00 32,250 44,134 37,692.603        
Jan 19,2010 19:00 30,864 45,613 38,464.082        
Jan 19,2010 18:00 33,834 46,558 39,911.283        
Jan 19,2010 17:00 30,718 45,148 38,196.511        
Jan 19,2010 16:00 28,564 95,220 68,276.614        
Jan 19,2010 15:00 72,379 80,300 76,146.219        
Jan 19,2010 14:00 72,280 80,676 76,766.343        
Jan 19,2010 13:00 72,368 81,851 77,025.921        
Jan 19,2010 12:00 72,207 81,010 76,486.628        
Jan 19,2010 11:00 72,470 83,620 77,912.033        
Jan 19,2010 10:00 71,792 84,861 77,681.014        
Jan 19,2010 9:00 72,609 85,596 79,476.32        
Jan 19,2010 8:00 72,271 84,172 77,630.085        
Jan 19,2010 7:00 72,034 81,354 76,698.898        
Jan 19,2010 6:00 68,917 82,535 77,042.467        
Jan 19,2010 5:00 69,766 132,927 113,065.557        
Jan 19,2010 4:00 35,009 96,857 67,819.16        
Jan 19,2010 3:00 33,312 42,370 38,085.804        
Jan 19,2010 2:00 32,310 41,490 36,942.579        
Jan 19,2010 1:00 32,643 41,507 36,826.053        
Jan 19,2010 0:00 31,804 42,798 36,875.239        
Jan 18,2010 23:00 31,702 43,178 37,664.882        
Jan 18,2010 22:00 32,197 43,718 37,620.637        
Jan 18,2010 21:00 32,387 45,445 39,234.95        
Jan 18,2010 20:00 32,649 45,187 38,667.051        
Jan 18,2010 19:00 32,481 47,736 39,582.564        
Jan 18,2010 18:00 31,671 43,583 38,131.032        
Jan 18,2010 17:00 32,154 77,976 48,955.505        
Jan 18,2010 16:00 69,703 77,199 73,235.682        
Jan 18,2010 15:00 70,308 77,853 73,880.917        
Jan 18,2010 14:00 69,299 77,393 72,959.995        
Jan 18,2010 13:00 69,347 78,257 74,030.148        
Jan 18,2010 12:00 68,699 76,235 72,015.927        
Jan 18,2010 11:00 69,395 80,730 74,866.812        
Jan 18,2010 10:00 68,672 80,307 74,888.338        
Jan 18,2010 9:00 69,550 81,725 75,830.766        
Jan 18,2010 8:00 68,722 79,751 73,937.929        
Jan 18,2010 7:00 68,752 77,356 73,081.946        
Jan 18,2010 6:00 26,248 108,267 73,403.88        
Jan 18,2010 5:00 95,679 127,161 109,593.064        
Jan 18,2010 4:00 47,955 98,383 72,407.854        
Jan 18,2010 3:00 26,147 65,423 48,632.371        
Jan 18,2010 2:00 64,799 74,275 69,846.868        
Jan 18,2010 1:00 65,121 74,161 69,490.395        
Jan 18,2010 0:00 64,474 73,245 69,182.725        
Jan 17,2010 23:00 65,059 74,206 69,664.471        
Jan 17,2010 22:00 64,545 73,704 68,803.643        
Jan 17,2010 21:00 64,419 73,360 69,004.475        
Jan 17,2010 20:00 64,916 73,483 68,918.454        
Jan 17,2010 19:00 64,107 72,132 68,201.827        
Jan 17,2010 18:00 64,069 72,793 68,414.479        
Jan 17,2010 17:00 63,904 72,691 68,343.423        
Jan 17,2010 16:00 64,561 72,210 68,384.022        
Jan 17,2010 15:00 63,515 71,046 67,363.827        
Jan 17,2010 14:00 63,848 72,167 68,111.968        
Jan 17,2010 13:00 63,414 73,129 68,794.57        
Jan 17,2010 12:00 63,092 73,771 68,633.143        
Jan 17,2010 11:00 64,023 74,744 68,956.479        
Jan 17,2010 10:00 63,866 75,864 69,848.172        
Jan 17,2010 9:00 63,902 75,660 69,802.104        
Jan 17,2010 8:00 63,601 74,271 69,934.148        
Jan 17,2010 7:00 63,644 73,560 68,470.372        
Jan 17,2010 6:00 20,261 74,162 63,771.39        
Jan 17,2010 5:00 58,085 121,392 102,145.08        
Jan 17,2010 4:00 44,711 100,633 74,476.795        
Jan 17,2010 3:00 65,292 72,898 69,100.473        
Jan 17,2010 2:00 64,608 73,079 68,562.423        
Jan 17,2010 1:00 64,542 73,051 69,012.858        
Jan 17,2010 0:00 62,924 72,488 68,244.261        
Jan 16,2010 23:00 63,260 72,764 68,021.761        
Jan 16,2010 22:00 63,309 73,000 67,696.471        
Jan 16,2010 21:00 63,526 72,810 68,351.907        
Jan 16,2010 20:00 64,406 73,274 68,339.499        
Jan 16,2010 19:00 62,963 72,686 68,088.466        
Jan 16,2010 18:00 62,588 71,932 67,273.14        
Jan 16,2010 17:00 63,384 72,431 67,547.097        
Jan 16,2010 16:00 62,850 71,744 67,653.404        
Jan 16,2010 15:00 62,560 70,810 66,544.317        
Jan 16,2010 14:00 63,714 70,172 67,191.52        
Jan 16,2010 13:00 62,516 69,940 65,960.844        
Jan 16,2010 12:00 63,181 70,927 67,005.882        
Jan 16,2010 11:00 62,685 71,932 67,194.646        
Jan 16,2010 10:00 65,563 73,864 69,882.256        
Jan 16,2010 9:00 62,484 73,693 67,458.372        
Jan 16,2010 8:00 62,448 73,733 68,055.59        
Jan 16,2010 7:00 60,394 71,583 65,611.901        
Jan 16,2010 6:00 59,897 70,625 64,812.681        
Jan 16,2010 5:00 85,727 115,678 100,679.943        
Jan 16,2010 4:00 25,474 91,632 59,241.573        
Jan 16,2010 3:00 5,992 11,749 8,938.03        
Jan 16,2010 2:00 6,471 10,700 8,533.393        
Jan 16,2010 1:00 5,774 179,255 42,363.227        
Jan 16,2010 0:00 148,935 161,041 155,200.382        
Jan 15,2010 23:00 148,358 160,489 154,498.40        
Jan 15,2010 22:00 148,511 161,516 154,920.717        
Jan 15,2010 21:00 147,978 160,507 154,245.609        
Jan 15,2010 20:00 148,262 161,029 154,603.199        
Jan 15,2010 19:00 147,632 161,639 154,303.484        
Jan 15,2010 18:00 148,726 162,421 156,102.307        
Jan 15,2010 17:00 147,772 161,830 154,844.551        
Jan 15,2010 16:00 147,386 160,732 154,144.528        
Jan 15,2010 15:00 149,030 162,089 155,408.457        
Jan 15,2010 14:00 148,383 162,537 155,339.279        
Jan 15,2010 13:00 148,572 161,589 155,084.02        
Jan 15,2010 12:00 147,709 160,621 154,277.548        
Jan 15,2010 11:00 147,728 160,192 154,010.398        
Jan 15,2010 10:00 148,064 160,922 154,446.35        
Jan 15,2010 9:00 147,312 164,021 155,445.242        
Jan 15,2010 8:00 148,420 161,112 154,358.185        
Jan 15,2010 7:00 147,890 158,423 152,624.714        
Jan 15,2010 6:00 22,969 158,313 140,253.406        
Jan 15,2010 5:00 160,080 197,358 179,754.08        
Jan 15,2010 4:00 57,059 176,820 107,356.24        
Jan 15,2010 3:00 120,770 131,238 125,954.238        
Jan 15,2010 2:00 122,052 131,862 126,957.251        
Jan 15,2010 1:00 119,703 131,974 125,553.66        
Jan 15,2010 0:00 119,289 129,827 124,708.932    


Thanks
Paulwintech
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

It is hard to decipher that data. Can you link to an excel sheet or some sort of structured format ?

Does your application crash when this happens or does it manage to recover ?

Please also post the JVM version and the arguments that you pass to it.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5838
    
    7

What does this data reflect? Heap usage from the JVM point of view? Memory usage from the OS point of view? I am not familiar with OPmanager so you will have to do some interpretation of the results to explain what the data means. Either way, I see nothing to be concerned with considering that the high value never even gets near 200MB.

You might also explain under what conditions OPmanger would issue a " GC critical alert". Too many GCs within a certain time period? Too many major GCs in a row? Too much heap memory used before a major GC? Too much heap memory in use after a major GC? Not knowing what the alert means makes it impossible to tell you what can be done to alleviate the problem (if there even is one).

Perhaps the trigger in OPmanager that warns about GC is not set correctly and is giving false positives. It is very likely that at some point the app deployed to Tomcat needs to gather a lot of data to do something (very possible for a monthly or yearly report, for example) and thus during that time heap usage goes up for a while until the app is done doing whatever it is doing (finishing the report, for example).

If you are really concerned about the heap usage, use a tool like jmap or VisualVM (both come with the JDK) to dump and analyze the heap. This will tell you which objects appear in abundance and give you a better idea of where to look in the app to understand what is going on.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: TOMCAT GC Issue