A Unique Developer

Configure ColdFusion with VisualVM

For one of our project we are facing jrun high usage issue. When looking into task manager (Window 2008) I found jRun continously eating up 50% CPU usage even though there is no traffic (or may be 2 to 3 users) only on site. Initially I tried to install FusionReactor to get all kind of detail regarding ColdFusion. Started with trial version and thought if useful then get full version but it seems that giving me all application ColdFusion application related information but can't find anything why JRun eating 50% of CPU usage. After bit googing I found VISUALVM and JConsole for monitoring and troubleshooting java application. I like VisualVm due to it's nice GUI and also I can integrate JConsole as plugin to it. It win - win kind of situation. 

I am not going to much detail about VisualVm and JConsole as they already have good documentation on their wetsite. All here I am going to explain is how to install VisualVm to work with ColdFusion for window OS.

  1. Download VisualVM (zipped version) and extract it wherever you want to place.
  2. Start VisulaVM by invoking [visualvm folder]/bin/visualvm.exe file.
  3. Look Good.. I can see running Java application VisualVm, ColdFusion Builder and other two my java application in list but stop where is my ColdFusion. I can't find ColdFusion in list, Yes because we may need to add some setting for this on ColdFusion administrator.
  4. Open ColdFusion administrator and Goto Server Settings >> Java and JVM tab.
  5. In JVM Arguments box add following JVM arguments and restart your ColdFusion service.
  6. Now in VisualVm go to File >> Add JMX Connection option. This will open up popup window.
  7. In connection enter localhost:8701 (Port that we added in JVM argument).
  8. In display name text field enter ColdFusion (or whatever you like) and click on OK will add ColdFusion in application list.
Double click on Application name to see running thread, memory usage and many more...