Web Development

Getting VisualVM to Connect to Railo 4

VisualVM is a great Java VM debugging tool that can show you VM performance as it runs your code. Since Railo runs on Java VM, this is a great tool to see if your code is leaking memory.

NOTE: This setup is on a debian linux box running railo installed via the script with an apt-get install apache frontend. This should behave similarly on ubuntu, centos, etc. Please leave comments if you have issues.

Edit /opt/railo/tomcat/bin/setenv.sh (~ line 6)

Append to the line with your JAVA_OPTS variable the commands in red below. ( I spaced out the code below for readability, but keep the red text to one line)

JAVA_OPTS=”-Xms512m -Xmx3G -XX:MaxPermSize=256m

-Djava.rmi.server.hostname=<your server’s ip — i.e.>

“; # memory settings

Save and then restart “/etc/init.d/railo_ctl restart

-You can use any available port number
-Use your server’s real IP to tell where to bind the listener, without it, the listener will be localhost only.

openanalytics 231 views

I'm a 33 year old UIUC Computer Engineer building mobile apps, websites and hardware integrations with an interest in 3D printing, biotechnology and Arduinos.

View Comments
There are currently no comments.

This site uses Akismet to reduce spam. Learn how your comment data is processed.