If you're nervous about registry work, back up your registry. Then open regedit 
and find:
HKLM\SYSTEM\CurrentControlSet\Services\Apache Tomcat 4.1\Parameters

(You can choose a different control set as well, and for Tomcat 5 users, this 
is under ...\Services\Tomcat5\Parameters.)

You should see some Java startup options there already. They are named "JVM 
Option Number x" where x is a zero-based option count. The x *must* be 
incremented by one each time. If you skip a number, only the options before the 
skip will be loaded. e.g. If you set options 0, 1, 3, 4, and 5, then only 0 and 
1 will be loaded. The rest will be ignored. Also, you must set the "JVM Option 
Count" key to the total number of options you have set. This will be one more 
than your highest option number. Think of it as an array where the options are 
the elements and the option count is the array length. I would guess that's how 
it's implemented.

-----Original Message-----
From: "David Johnson"<[EMAIL PROTECTED]>
To: "Tomcat Users List"<[email protected]>
Date: Thu Jan 06 07:40:27 PST 2005
Subject: Re: Out of Memory when compiling JSP (Struts app on Tomcat 4.1.27)

>Cool. Thanks
>
>the question is how do I get all of these options working when tomcat
>runs as a service...
>
>
>
>
>On Thu, 6 Jan 2005 15:28:30 -0000, Dale, Matt <[EMAIL PROTECTED]> wrote:
>> It could also be that the Permanent Generation has filled up, look up the 
>> docs on how to increase that or start with -XX:MaxPermSize=128M
>> 
>> -----Original Message-----
>> From: SANTOS, DANIEL (SBCSI) [mailto:[EMAIL PROTECTED]
>> Sent: 06 January 2005 14:57
>> To: Tomcat Users List; [EMAIL PROTECTED]
>> Subject: RE: Out of Memory when compiling JSP (Struts app on Tomcat
>> 4.1.27)
>> 
>> Chachany,
>> 
>> It sounds like it's using the default of -Xmx64m.  Probably the best way
>> to troubleshoot out or memory errors is to see what is really happening
>> with garbage collecting, the same way that you tune it.  If you can add
>> these options, then the JVM will spit out all kinds of useful
>> information:
>> 
>> -XX:+PrintTenuringDistribution -XX:+PrintGCDetails -Xverbosegc
>> 
>> But it sounds like the problem is that it's not getting the options.
>> What you really need to figure out is exactly how the service is getting
>> started.  For instance, if it's calling tomcat.exe then I don't believe
>> that the JAVA_OPTS environment variable is ever looked at since that is
>> in the startup.sh and startup.bat files (I'm not 100% certain about that
>> however).
>> 
>> Find out how it's starting.  Also, post the version of Java you are
>> using (since the options I gave you above don't work on all versions, I
>> think 1.4 and up or 1.3 and up).  But the -Xverbosegc works all the way
>> back to 1.1 if I'm correct.
>> 
>> Daniel
>> 
>> -----Original Message-----
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, January 06, 2005 8:25 AM
>> To: [email protected]
>> Subject: Out of Memory when compiling JSP (Struts app on Tomcat 4.1.27)
>> 
>> Hi all
>> 
>> I'm working on an application currently that is experiencing some
>> intermittent memory problems when installed onto our "integration
>> test" server, but not on the development staff's local laptops.
>> 
>> I have attempted to increase the maximum memory available to Tomcat by
>> creating a global environment variable (because tomcat runs as a
>> service)
>> 
>> JAVA_OPTS=-Xmx512M
>> 
>> Which doesnt seem to have made a difference. Is this the best way to
>> increaqte the memory available to an application? Is my syntax wrong?
>> Are there other options I can set that will help?
>> 
>> The weird thing is that when I look at the memory usage of Tomcat.exe,
>> the most memory it has used is 110,000
>> 
>> there seems to be no pattern to the memory errors (as usual) and it
>> happens a lot when compiling JSP files.
>> 
>> The system memory seems high, but not horribly so. I see the following
>> in Task Manager
>> 
>> MEM Usage = 885,000 (varies)
>> 
>> Commit Charge:
>> Limit : 2,522,244
>> Peak : 958,260
>> 
>> Anyone?
>> 
>> Thanks!
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>


___________________________________________________
Check-out GO.com
GO get your free GO E-Mail account with expanded storage of 6 MB!
http://mail.go.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to