File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Tomcat5- how can I get the Initial Memory pool numers set on command line to show up in GUI tool? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat5- how can I get the Initial Memory pool numers set on command line to show up in GUI tool?" Watch "Tomcat5- how can I get the Initial Memory pool numers set on command line to show up in GUI tool?" New topic
Author

Tomcat5- how can I get the Initial Memory pool numers set on command line to show up in GUI tool?

Christos Maats
Greenhorn

Joined: Nov 25, 2010
Posts: 5
We use an ant task to install and start the tomcat5 service (using service.bat install tomcat5).

Once installed I run tomcat5w.bat (in \bat) to open up the GUI tool to view the properties of the installed service:

On the Java tab note I see "Initial memory pool", "Maximum memory pool" have no values set.

Without these values set, our web application blows up when I start clicking around (out of memory issue). When I set those two values by hand in the GUI tool - click Apply and restart the service our web app works fine!

My question is: How can I set these two values using the command line and NOT using the GUI tool? (because I want to get my ANT task to set these values...not a GUI tool)

I have tried on the command line: C:\apps\jakarta-tomcat\bin>tomcat5 //US//tomcat5 --JvmMx 1024 --JvnMx 1024

which is the command to update the service - but every time I open the GUI tool, it still shows these values as blank...

ideas?

Thanks!
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Christos Maats wrote:
I have tried on the command line: C:\apps\jakarta-tomcat\bin>tomcat5 //US//tomcat5 --JvmMx 1024 --JvnMx 1024


What is JvnMx?

It should be something like
--JvmMs 1024 --JvmMx 1024


You could check http://tomcat.apache.org/tomcat-5.5-doc/windows-service-howto.html
Christos Maats
Greenhorn

Joined: Nov 25, 2010
Posts: 5
Hi thanks for your reply.

Yes, that was a typo - I meant JvmMs & JvmMx.

I have already looked at the link you posted weeks ago, and have tried a lot of combination of parameters with no success.

Basically I am looking to see if anyone out there can provide me the command line syntax (that they have tested!) that will manipulate the already installed Tomcat 5 service such that, after the command has executed, I can open up the GUI (tomcat5w.bat) that you can SEE the Values set on the Java tab: "Initial memory pool" & "Maximum memory pool" set to the values specified in the command line.

Thanks guys, I appreciate any help you can give me!
Christos Maats
Greenhorn

Joined: Nov 25, 2010
Posts: 5
can anyone figure this out and give me the answer as my Christmas present?
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Most likely you have an issue with ANT configuration for tomcat installation or something is wrong in tomcat5w.bat file. By the way what is inside tomcat5w.bat file?

If you install Tomcat 5.5 service by running



This will display default memory values 128 and 256



This will change memory settings




Christos Maats
Greenhorn

Joined: Nov 25, 2010
Posts: 5
Misha Ver wrote:... By the way what is inside tomcat5w.bat file?


I dont have a tomcat5w.bat file in my bin directory. Should I have one? I just have a tomcat5w.exe (for things that have the tomcat5w name on them)

Misha Ver wrote:
If you install Tomcat 5.5 service by running




Yes, this installs the service... I can see it in Services as "Apache Tomcat" it is set to Manual startup type

Misha Ver wrote:
This will display default memory values 128 and 256



No! Now I run tomcat5w.exe to bring up the GUI. Go to the Java tab...the values for Initial Mem and Maximum Mem are blank. There are no values.
Are you saying that when you click on your Java tab, you SEE the values of 128 and 256 at this stage???



Misha Ver wrote:
This will change memory settings




Tried this, then opened the GUI and still...do not see the new values where I am expecting to see them.


Thank you so much for helping me with this.
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Christos Maats wrote:
Misha Ver wrote:... By the way what is inside tomcat5w.bat file?


I dont have a tomcat5w.bat file in my bin directory. Should I have one? I just have a tomcat5w.exe (for things that have the tomcat5w name on them)




From your first message

Christos Maats wrote:...
Once installed I run tomcat5w.bat (in \bat) to open up the GUI tool to view the properties of the installed service
...
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Christos Maats wrote:
Misha Ver wrote:
This will display default memory values 128 and 256



No! Now I run tomcat5w.exe to bring up the GUI. Go to the Java tab...the values for Initial Mem and Maximum Mem are blank. There are no values.
Are you saying that when you click on your Java tab, you SEE the values of 128 and 256 at this stage???


Do you run "tomcat5w.exe" or "tomcat5w //ES//tomcat5" ? I see the values of 128 and 256 after running "tomcat5w //ES//tomcat5"
Christos Maats
Greenhorn

Joined: Nov 25, 2010
Posts: 5
Hey Misha,

If I run tomcat5w.exe or tomcat5w //ES//tomcat5 I still get no values at all when I select the Java tab.

Not sure what else to try.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat5- how can I get the Initial Memory pool numers set on command line to show up in GUI tool?