Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Apache Tomcat Service Config

Options
  • 16-02-2004 7:00pm
    #1
    Registered Users Posts: 4,222 ✭✭✭


    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 Posts: 4,222 ✭✭✭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