Unable to get the tomcat working with the CATALINA_OPTS opti

hi,

We have an application deployed on the TOMCAT-4.1.30. Off and On the application is throwing the following error:

[Exception in thread “CompilerThread0” java.lang.OutOfMemoryError: requested 32756 bytes for ChunkPool::allocate. Out of swap space?]

As it being an memory exception, we are trying to increase the memory allocation to the Tomcat server with the following parameters enabled.

CATALINA_OPTS=‘-Xms256m -Xmx512m’
JAVA_OPTS=‘-Xms256m -Xmx512m’

After doing this, when I am trying to restart the tomcat server, tomcat is not shutting down and is giving the following error.

“Error occurred during initialization of VM
Could not reserve enough space for object heap”

Its working fine, if I am disabling those options.

To start with is my approach right that Im setting CATALINA_OPTS and JAVA_OPTS parameters to diagnise the problem?

Please help as it is of high priority for our developers.

Thanks,
sarath.

Sarath,

Those are the options you need to pass to the JVM.

When you mention Tomcat, is this for running Tamino WebDAV server?

What version of the JDK are you using, and on what OS?

I recall having similar problems once with a particular JDK and OS … you might try experimenting with other combinations of values for Xms and Xmx, or a different JDK.

Hi,

I think we have resolved the problem. This is what we have done.
Previously as i mentioned, we are trying to pass two values(-Xms256m and -Xmx512m) to CATALINA_OPTS and its not working. So, we tried passing only one value (i.e.max value: -Xmx512) and its working fine. Somehow, in solaris passing both values one time is not working. But its working fine on Linux.

Anyway, for now I think its fine, unless we get the same appliation error that we faced before.

Thanks for your prompt support.

Regards,
sarath.

hi,
To addup to what I have said before,

We are using Tomcat 4.1.24 version on jdk 1.4.2_03 version.
OS Version: Sun4u SPARC Sun-Fire 280R

Regards,
Sarath.