I have been developing web applications, bundling as WAR's, and deploying to Tomcat version 6. My production server is configured to receive requests on a Apache server and redirect to Tomcat with AJP1.3. Aside from a few configuration changes to support higher volumes, virtual hosts, and different listener ports, I am baffled by the amount of memory being consumed at deployment or restart of my tomcat instance. I have 13 different web apps I would like to deploy on this Tomcat instance, but keep running out of memory when trying to deploy more than 9. I have increased the memory options to a max of 512m but am wondering if I am missing something or have configured something wrong because my test server Tomcat instance is configured with a 64m max and has all 13 apps deployed and starts just fine.
Can anyone point me in an direction that will help me better understand why 64 meg will allow for deployment of 13 web apps, but those same 13 will not deploy with an instance setup for 512 meg?
Also, I have created another instance to support the apps that I can not deploy on my primary instance but assume I will run into the same problem once I start adding more web apps to that one too. So I started setting up another instance of Tomcat and it will not start and fails with the following error.
Caused by: java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Unknown Source)
... 6 more
Any help would be greatly appreciated.
Author and all-around good cowpoke
Joined: Mar 22, 2000
Have you used the Management App to check on how many request threads are running and the change in memory use?
That Thread problem sounds like you have a bunch of Threads that are hung somewhere - I had this happen when requests were waiting for a resource that was no longer available.
Yes... I have watched the existing apps run in the manager and I have seen garbage collection work. Do you have any idea why one instance on one machine will work fine when deploying 13+ apps with a max heap of 64meg for memory, but those on another with 512 meg will not deploy those same 13 apps. The only difference really is the fact that I use AJP13 to connect my Apache web server to the Tomcat. Do you know anything about AJP holding threads?