Hi,

We are using the following configuration:

Tomcat: 5.0. 
OS: Windows Server HPC edition.  
JVM: 5.0

There is one basic doubt that I have. When we load/stress our Tomcat server, we 
hit thresholds mentioned below once in a while. The root of the problem is that 
when I increase the clients, I start getting a connection refused error on the 
server side. This is because the server hits the maximum request processing 
thread limit. The other problems are connected to it:

-Max threads (tomcat): 

As mentioned above, this is the root of the problem. To solve this problem, I 
increase the max threads in server.xml. Then I get the Out of stack space 
exception. 

-Stack Memory:
 
Now for this I tried a couple of things
a) Reduce the stack size allotted per thread so that more threads can be 
spawned in the allotted stack space.I believe that the default is around 320K/ 
thread. I set it to 128K in the JVM options (Xss). 
b) Reduce the heap size. I did this because as per my understanding the memory 
alloted to a process is divided among heap and stack. So probably reducing the 
heap size makes more memory available for stack. Don't know if this is correct?

Now once in a while I get Out of memory exception for heap space.

-Heap Memory: 

Can somebody advise as to what are the solutions for these sort of problems 
other than reducing the memory/thread consumption, of our application logic. I 
mean are there techniques that can be applied on tomcat/JVM/OS level to make 
more threads/memory available to the tomcat process? 

Please advise.

Thanks!
Prashant


      

Reply via email to