2

I have a Tomcat6 server running on Debian squeeze there are 4 webapps running on it, and an in-JVM ActiveMQ server.

It has been running for about a year with the same memorysettings, with openjdk-6. Everything has worked dandy, no issues at all.

Now, for various reasons, i need to try out Sun's JDK.

So, I installed sun's jvm with standard apt-get

apt-get install sun-java6-bin , and switched using

update-java-alternatives -s java-6-sun

However, when i start tomcat, i get outofmemory, the server won't even start! If i switch back to openJDK, all works fine again.

I haven't had any memory issues on this server before, so it feels strange that the server suddenly won't start with sun's JDK.

Anybody have any clue as to why this might happen? Have i missed something?

I naturally have set heap sizes etc. in tomcat. Currently running with:

-Xms256m -Xmx1024m

Which as mentioned works in openSDK, outofmemory in sun-jdk...

EDIT: server is 64-bit, openJDK and Sun are 1.6.0, both 64-bit JVMs.

Mathias
  • 121
  • 3

1 Answers1

0

going to answer my own question since i figured this one out in the end:

As it turns out, we had set the xmx and xms, However, we had NOT set -XX:MaxPermSize.

This one is per default 256mb in openJDK, but only 128mb in SunJava. This is what caused it when switching.

After entering -XX:MaxPermSize=256m in catalina.sh all works fine in both JVMs!

Mathias
  • 121
  • 3