Wednesday, October 22nd 2008

Running Java servlets and Java application servers on Media Temple DV Servers
posted @ 5:29 am in [ Fixing Things -Media Temple -Technology -Web Design ]

I’ve always had problems trying to run Java based application servers on Media Temple Dedicated Virtual Servers (DV Servers), as although they have lots and lots of disk space and bandwidth, they seem to have very small memory spaces that you can run containers in.

Java by default powers up with about 1024Mb of memory requirements, so if you are installing Apache Tomcat (java servlet engine) or Red 5 (Open Source Flash Video server – very good, try it out) you have to seriously reign in the memory these guys try and use when powering up.

For reference the best way to achieve this is using the -Xms and -Xmx parameters, so in my case I added the following to the script for Tomcat

JAVA_OPTS=’ -Xms128M -Xmx128M’
export JAVA_OPTS 

Ideally I’d like a bit more memory to play with, but at least it works like this and the old application I’m supporting can run 🙂