You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Grzegorz Tańczyk <go...@polzone.pl> on 2005/12/22 11:12:29 UTC

Re[2]: [mod_jk] concurrency control problem

Hello Mladen,

Thursday, December 22, 2005, 8:43:42 AM, you wrote:
MT> Grzegorz Tańczyk wrote:
>> Hello
>> 
>>   My configuration is:
>>   - single machine with Slackware 10
>>   - apache 2.0.55 with worker MPM
>>   - tomcat 5.5.4
>>   - mod_jk 1.2.15
>> 
>>   Here is my apache<->tomcat configuration
>> 
>>   [user]->[mydomain.com vhost]-ProxyPass->[localhost vhost]-JKMount->[Tomcat]
MT> Perhaps posting workers.properties would help.
worker.w1.type=ajp13
worker.w1.host=localhost
worker.w1.port=8000
worker.w1.cachesize=200
worker.w1.cache_timeout=300
worker.w1.socket_timeout=300
worker.w1.socket_keepalive=0
worker.w1.recycle_timeout=100
worker.w1.recovery_options=3
worker.w1.prepost_timeout=100000
worker.w1.connect_timeout=100000
worker.w1.reply_timeout=100000

Other w2 and w3 have cachesize 100. cache_timeout unit is second or
milisecond?

And also there is a ProxyTimeout(20 seconds) before first ProxyPass.

>>   Everything works almost fine, but in some unknown circumstances I
>>   see in apache status that all workers(1000) are busy in R or W
>>   state.
MT> Did you set the cachesize for workers?
MT> Here is a simple math:
MT> (MaxClients/ThreadsPerChild)*cachesize=maxThreads

MT> You might also add retries=60 to the worker.
More retries = longer connection and more httpd workers busy?

What is the diffrence between AJP and HTTP connector in threads
management? Why AJP doesn't keep idle threads in (R)eady stage When I
disable connectionTimeout then after few moments tomcat hangs(all
threads are in (K)eepalive stage, but when I
enable connectionTimeout then all threads are killed after connection
is finished or timed out. Isn't it lost of time to create new threads
for each new connection?

Thanks for reply.

MT> Regards,
MT> Mladen.

-- 
Best regards,
 Grzegorz                            mailto:goliatus@polzone.pl


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


Re[2]: [mod_jk] concurrency control problem

Posted by Grzegorz Tańczyk <go...@polzone.pl>.
Hello Mladen,

  Thanks for answer. I will inform in this thread about any problems,
  but until now it looks like that change of cachesize and
  cache_timeout fixed the problem.

Thursday, December 22, 2005, 12:19:23 PM, you wrote:
MT> You will need to lower the:
MT> worker.w1.cachesize=maxThreads(server.xml)/ServerLimit (httpd.conf)

MT> So if you wish to have no more then 200 connections to Tomcat/worker
MT> and you have 1000 MaxClients with 25 ThreadsPerChild.
MT> This will give you max of 40 Servers.
MT> Now divide 200/40 and that is your cachesize (5 in that case).

MT> If you start receiving 503 (Server Busy), Increase the maxThreads
MT> and cachesize or add retries=60 for lb worker.

MT> Regards,
MT> Mladen.

-- 
Best regards,
 Grzegorz                            mailto:goliatus@polzone.pl


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


Re: [mod_jk] concurrency control problem

Posted by Mladen Turk <ml...@jboss.com>.
Grzegorz Tańczyk wrote:
> Hello Mladen,
> 
> MT> Perhaps posting workers.properties would help.
> worker.w1.type=ajp13
> worker.w1.host=localhost
> worker.w1.port=8000
> worker.w1.cachesize=200
> worker.w1.cache_timeout=300
> worker.w1.socket_timeout=300
> worker.w1.socket_keepalive=0
> worker.w1.recycle_timeout=100
> worker.w1.recovery_options=3
> worker.w1.prepost_timeout=100000
> worker.w1.connect_timeout=100000
> worker.w1.reply_timeout=100000
> 
> Other w2 and w3 have cachesize 100. cache_timeout unit is second or
> milisecond?
>

miliseconds.

You will need to lower the:
worker.w1.cachesize=maxThreads(server.xml)/ServerLimit (httpd.conf)

So if you wish to have no more then 200 connections to Tomcat/worker
and you have 1000 MaxClients with 25 ThreadsPerChild.
This will give you max of 40 Servers.
Now divide 200/40 and that is your cachesize (5 in that case).

If you start receiving 503 (Server Busy), Increase the maxThreads
and cachesize or add retries=60 for lb worker.

Regards,
Mladen.

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