indifferent I’m toying around

Chronon javaagent on Tomcat 6 (32-bit) Tips


I tried starting a local Tomcat 6 instance with the javaagent enabled, following the instructions for recording outside of eclipse. I'm on Win XP 32-bit, using Tomcat 6.0.29 on a 1.6.0_21 server VM. I have tomcat running as a service.

I just wanted to share a few problems I encountered (and their respective solutions):

1) Make sure the two parameters "-javaagent xyz" and "-agentpath" are on an individual line each in the java options from tomcat6w, otherwise Tomcat won't start up:


2) If you run into a "Could not reserve enough space for object heap" error starting up tomcat, you have to REDUCE the maximum Memory for the Tomcat JVM. I always run my tomcat instance with the maximum possible Memory I get it to start up with, which is around 1100MB on my box (32bit, remember). With the javaagent enabled the VM wasn't able to create an 1100MB Heap anymore, because the chronon-agent needs quite some memory that the VM has to provide, and that will not be available for the normal Heap.

In my case I had to reduce -Xmx from 1100M to 975M to get Tomcat up and running.

Note: This is irrelevant for 64-bit systems, because there's no "2GB per process" address space limitation.
2 people like
this idea