wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Memory Usage Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Memory Usage Issue" Watch "Memory Usage Issue" New topic
Author

Memory Usage Issue

Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 274
Hello,
I have a Windows 2003 Server that runs two web apps under Tomcat 4.1. A problem that I am seeing is that when I look at the task manager, the Memory Usage for the tomcat.exe process is continually growing larger day by day, until Tomcat finally crashes. It has also caused the server itself to crash.

I was hoping someone might have a tip on logging that I could use to track down what is going on. I believe if I configure logging in server.xml, it will log for tomcat in general. Would I configure logging in the web.xml of each of the two apps to get app specific messages ? Anyone have any examples of how they set up logging? Also, I have read very much about this online and am getting confused by the many kinds of logging, like "log valves" and "File logs" , etc. etc.

Any other tip on how to track down what is causing a problem like this?

Many thanks,
Kim
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
I discovered a problem by using the Manager display that shows (among other things) the status of request Threads. It turned out some were getting stuck and never completing. Manager also shows what Tomcat thinks the memory usage is.
Bill
Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 274
Hello,
Thank you for your reply. I have set up the manager app, but do not see the kind of information you are refering to. I just see the applications that I have running, with columns for running, sessions, and commands.
How do you navigate within the manager in order to see thread and memory information?
Thanks,
Kim
Srinivasan Jayabalan
Greenhorn

Joined: Jun 21, 2004
Posts: 4
Try http://yourserver:yourport/manager/status
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Kim Kantola:
Hello,
Thank you for your reply. I have set up the manager app, but do not see the kind of information you are refering to. I just see the applications that I have running, with columns for running, sessions, and commands.
How do you navigate within the manager in order to see thread and memory information?
Thanks,
Kim


http://localhost:8080/manager/html
At the top of the header, click the "Server Status" link.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 274
Hi ,
Thank you so much for your replies. I do not see the "Server Status" link when I go to the Tomcat Manager. Maybe this is because I am trying to look at this on my developement machine, running windows XP ? I know in an earlier post on this thread I mentioned windows 2003 server, but that is my production machine, sorry. Is there any way to use the manager to look at threads that are not being let go as earlier mentioned when on Windows XP? Maybe the tomcat Manager doesnt include that info in the 4.1 version?
Thanks for any help,
Kim
Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 274
Ah, I just googled and found a link to a page which shows help with using the Tomcat Web Application Manager. A screenshot on that page did indeed show the manager app with a "Server Status" link which I do not see when I go to my http://localhost/manager/html.

Can anyone verify that this server status thing is new to 5.0, and maybe that is why I do not see it. Is there anyway I can get the manager to show this "server status" link using tomcat 4.1 ?

Thanks!
Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 274
My Guess was correct, I downloaded and installed Tomcat 5.0, and there was the server information link. Guess it wasn't part of Tomcat manager pre 5.0 version.

Just an FYI in case anyone else has this problem.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Memory Usage Issue