top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

Local VisualVM connection to Tomcat

0 votes
35 views

I am constantly encountering PermGen errors despite quite high PermGen limit (even 512m) and many options set - approx once a week under not heavy load.

I am trying to investigate what the app causes this, but I haven't succeeded in reproducing it locally yet.

I found several articles about VisualVM (I hope it could help me to determine some PermGen issues) and connecting it to the Tomcat. Remotely. But I have no clue how can I conect the local VisualVM to tomcat that runs on localhost.

Even here it is written:
http://tomcat.apache.org/tomcat-7.0-doc/monitoring.html

Enabling JMX Remote
Note: This configuration is needed only if you are going to monitor Tomcat remotely. It is not needed if you are going to monitor it locally, using the same user that Tomcat runs with.

But there is no further description for that simpler (local) method. If it is obvious, sorry, but I am lost here ;-)

posted Jun 27, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

It's actually very simple.

  1. Start up Tomcat from startup.sh / startup.bat
  2. Fire up visualvm
  3. The Local node should have Tomcat visible
  4. Double-click on the Tomcat element, and you're connected

Getting a first start on where your leaks are is pretty easy as well.

  1. Load your web application
  2. Run it to generate the leak
  3. Unload it from Tomcat using the manager app (or any other method)
  4. Do a Find Leaks from the manager app (or garbage collection from VisualVM)
  5. Do a heap dump
  6. In the classes, look for org.apache.catalina.loader.WebappClassLoader
  7. Find the instance where the boolean started is false
  8. Right-mouse on the instance and search for nearest GC Root
  9. Find classes that you wrote and fix

This gets the classLoader leak . . . others can be found by looking for application - specific classes.

answer Jun 27, 2013 by anonymous
Similar Questions
+1 vote

I am running Tomcat 7.0.41 on a Windows laptop (8.1 Pro). I recently reinstalled the Windows and since re-installing tomcat and my server application, it runs fine when I connect to it from a web browser.

However, when I tell my desktop client app to connect to the server, it fails on the initial connection with a 405status. I am running the server is debug, from Eclipse, and have put breakpoints in the doGet, doPost, and doPut methods of my ControllerServlet class that extends the java.servlet.http.HttpServlet. None of these breakpoints fire before the client gets back the 405 status. (the client works fine if connecting to the real server running tomcat 6 on an Ubuntu server.)

I can find no place locally where verb filtering is being configured.

Any suggestions?

0 votes

I am using Tomcat version 7.0.63.
I have registered the dbconnection pool with MBeanServer.
Is there a way to make those methods hot setting? What I mean by this is, for example if I change statement cache size in the jconsole, it should take effect immediately.

Any help is greatly appreciated.

+2 votes

With Tomcat 7.0.40 version, we are using Tomcat DBCP for pooling connections.

We are able to pool connections for different aliases. But for one alias, connections are not pooling. The user and password is good because the same alias in apache dbcp works fine.

Why are we not able to pool any connections here?

0 votes

Using tomcat 6.I Always confused with connectionTimeout

The number of milliseconds this *Connector* will wait, after accepting a connection, for the request URI line to be presented. The default value is 60000 (i.e. 60 seconds).

Helpful if anyone can explain.?

Is there any connector parameter where i can set request timeout.?Rather than at application level timeout i want tomcat to timeout after certain period if request taking long time..

0 votes

I'm trying to set up an existing Spring webapp that ran on a different container before (weblogic), to run on Tomcat. Working on it in Eclipse, I've gotten all of the compile errors out, and I was able to add the webapp to my Tomcat server instance in the "Servers" view. I started the server instance, and I didn't see any errors in the console log, but I also didn't see lines that looked like it was deploying my web module.

As expected, trying to access (and also trying various "index.html" variations) just gets a 404. It just seems like Tomcat is silently ignoring my webapp.

What information can I get to determine why this might be happening?


Useful Links with Similar Problem
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#470/147, 3rd Floor, 5th Main,
HSR Layout Sector 7,
Bangalore - 560102,
Karnataka INDIA.
QUERY HOME
...