Hi,

I am running Tomcat 4.1.30 on Ubuntu Linux 8.04.4 LTS. After moving the application from a 32-bit machine to a 64-bit machine with 4GB memory, suddenly tomcat failed to startup with the following error :-

>Stopping service Tomcat-Standalone
>May 29, 2010 4:27:36 PM org.apache.coyote.http11.Http11Protocol destroy
>INFO: Stoping http11 protocol on 8080 >Catalina:type=ThreadPool,name=http8080
>Error occurred during initialization of VM
>java.lang.OutOfMemoryError: unable to create new native thread

On the 64-bit machine, I used the following software :-

Ubuntu 8.04.4 LTS for amd64
Sun JDK 1.5.22 (amd64)

export JAVA_HOME=/opt/jdk1.5.0_22
export PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/bin:$PATH
export CLASSPATH=.
export CATALINA_OPTS="-Djava.awt.headless=true -d64 -Xss3072m -Xmx3072m -XX:PermSize=256m -XX:MaxPermSize=256m"

When I reduced the max memory to 1GB, tomcat started without any problem :-

export CATALINA_OPTS="-Djava.awt.headless=true -d64 -Xss1024m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=256m"

When I adjusted the max. memory to 1.5GB, the application failed after running 2 - 3 days with the following error :-

=== begin of log ===
....
Exception in thread "HostConfig[damascus]" java.lang.OutOfMemoryError: Java heap space
        at java.nio.CharBuffer.wrap(CharBuffer.java:350)
        at java.lang.StringCoding$CharsetSE.encode(StringCoding.java:340)
        at java.lang.StringCoding.encode(StringCoding.java:378)
        at java.lang.String.getBytes(String.java:812)
        at java.io.UnixFileSystem.canonicalize0(Native Method)
        at java.io.UnixFileSystem.canonicalize(UnixFileSystem.java:157)
        at java.io.File.getCanonicalPath(File.java:531)
        at 
org.apache.naming.resources.FileDirContext.file(FileDirContext.java:886)
at org.apache.naming.resources.FileDirContext.getAttributes(FileDirContext.java:487) at org.apache.naming.resources.BaseDirContext.getAttributes(BaseDirContext.java:797) at org.apache.naming.resources.ProxyDirContext.revalidate(ProxyDirContext.java:1461) at org.apache.naming.resources.ProxyDirContext.cacheLookup(ProxyDirContext.java:1415) at org.apache.naming.resources.ProxyDirContext.getAttributes(ProxyDirContext.java:839) at org.apache.catalina.startup.HostConfig.checkWebXmlLastModified(HostConfig.java:599)
        at org.apache.catalina.startup.HostConfig.run(HostConfig.java:854)
        at java.lang.Thread.run(Thread.java:595)
Exception in thread "StandardManager[/examples]" java.lang.OutOfMemoryError: Java heap space
        at java.util.HashMap.newValueIterator(HashMap.java:892)
        at java.util.HashMap$Values.iterator(HashMap.java:955)
        at java.util.AbstractCollection.toArray(AbstractCollection.java:173)
at org.apache.catalina.session.ManagerBase.findSessions(ManagerBase.java:664) at org.apache.catalina.session.StandardManager.processExpires(StandardManager.java:779) at org.apache.catalina.session.StandardManager.run(StandardManager.java:870)
        at java.lang.Thread.run(Thread.java:595)
Exception in thread "Thread-38" java.lang.OutOfMemoryError: Java heap space
Exception in thread "StandardManager[/webdav]" java.lang.OutOfMemoryError: Java heap space
....

=== end of log ===

Is there any known problem of Tomcat 4.1.30 working with 64-bit OS with 4GB memory? Do I need to migrate the application to Tomcat 5.x. I hope someone could advise what went wrong and how to make Tomcat 4.1.30 could utilize the 4GB memory on a 64-bit machine.

Thanks a lot.

John Mok

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to