You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Li Li <li...@moreatonce.com> on 2004/04/01 09:58:57 UTC

JVM memory allocation

Hi All,

I have some problems with my server.
I'm using Tomcat 5.0.18 with IIS 5.0 with isapi_redirector2.dll, J2SDK 1.4.2.
My server is running on Windows 2000 Server.
It has 2 processors and 2GB of memory.

My server, crashes very frequently.
At that time, Tomcat and IIS service is still running,  and the memory usage is around 20%, but the CPU usage consistently remain at 50% for about 1min, the browser will returned "Page Not Found" error when trying to access. Then I must restart my server. I even cannot just restart the "Apache Tomcat" and "W3svc" service, since one of them cannot be stopped. Can somebody figure out for me what caused this?


My JVM max Memory allocation for this server is about 128 MB, total memory is about 64M, sometime the free memory drop to 20K. I try to allocate more memory to JVM. I try to set it in system variable, in catalina.bat (set JAVA_OPTS=-Xms256 -Xmx512), and in workers2.properties, and even in Registry. But non of them work for me. Can anybody tell me how to increase the memory for JVM.

Actually, after I install Tomcat 5.0.18 as Service, it has written one record to Registry under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tomcat5", but just have two items, "Enum and Security", so I add one item "Parameters", which includes "JVM Library", "JVM Option Count", "JVM Option Number 0 ~ 4", ... So I can set "-Xms256M", and "-Xmx256M". But it doesn't work either, the total memory for JVM is still around 64M.

Another thing is the default name under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\" is "Tomcat5", which is inconsistant with the name in Service Monitor - "Apache Tomcat". Is this correct? And the CATALINA_HOME is "c:\Tomcat 5.0", which has a space inside. Does this will affect the result?


Regards,


Li Li





---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.616 / Virus Database: 395 - Release Date: 3/10/2004