Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Apache Tomcat Service Config

  • 16-02-2004 07:00PM
    #1
    Registered Users, Registered Users 2 Posts: 4,228 ✭✭✭


    Using Tomcat 4.1.24 on a windows2000 server machine.
    I'm trying to increase the maximum memory allocation that the Tomcat service can use as i need to be able to execute queries that can return up to (and possibly greater than) 65536 rows (max excel spread sheet page size).

    I've managed to increase it fine when involking the Startup.bat method to start Tomcat by editing the StartUp.bat file in "C:\Program Files\Apache Group\Tomcat 4.1\bin" to include the line

    set CATALINA_OPTS="-Xmx256m"

    This is fine for running on my test machine but i need to be able to set up the service that calls Tomcat.exe to also do this. Is there any way i could edit the registry settings to increase the max memory size?
    Cheers.


Comments

  • Closed Accounts Posts: 1,651 ✭✭✭Enygma


    Setting it as an environment variable should have the same effect.


  • Registered Users, Registered Users 2 Posts: 4,228 ✭✭✭Scruff


    figured out how to do it on the service level

    1) Open regedit and go to "\HKEY_LOCAL_MACHINE\SYSTEM|CurrentControlSet\Service\Apache Tomcat X.X\Parameters"

    2)Add a new String Value called "JVM Option Number X" where x is the next int value of current JVM Options

    3)Assign value "-Xmx(Heap Value)m" where (Heap Value) is the heap size in MB, e.g. -Xmx256m

    4)Increase the "JVM Option Count" value by 1

    5)Restart Service.

    marvelous! no more jsps throwing java.lang.OutOfMemory errors.
    :)


Advertisement