On 23.07.2010 04:07, Imran Khan wrote:
Hi,

I am currently using apache tomcat 5.5 using mod_jk to connect with apache
2.2.

I am curious to understand how the AJP 1.3 connector works. Basically I
would like to know if maxThreads attribute has the same meaning with the AJP
connector as it does with standard HTTP connectors. I would like to increase
the number of connectors, but I noticed there is also connection_pool_size
and connection_pool_minsize on the workers.properties file.

What is the relationship between the AJP connectors maxThreads and the
connection_pool_size?

The configuration of the connection pool size in workers.properties is per Apache *process*. On most platforms Apache has a dynamically managed number of processes, so in total there will be much more connections than the configured pool size. Pools are not shared over process boundaries. The most notable exception is Windows, since the Apache MPM for Windows uses a single process with lots of threads.

mod_jk will automatically detect how many threads per process you have and set the pool size to this value, see docs at:

http://tomcat.apache.org/connectors-doc/reference/workers.html

So you should fiddle with the pool size on the mod_jk side only, if you want to artificially restrict it. You might want to set the minimum pool size though.

For Tomcat the story is different, the max thread pool size is the maximum number of threads available to handle connections coming in on the respective Connector port. Since AJP uses persistent connections, you usually have much more connections, than in-flight requests. The numbers get even bigger, if you have a farm of Apache servers in front. Each one will consume Tomcat threads.

A good starting point for the mod_jk configuration is the example configuration contained in the mod_jk source download for version 1.2.30. Previous versions do not include a production ready example config.

Regards,

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to