Arshad Mahmood wrote:
> 
> Hi,
> 
> I am developing an using mod_jk, apache 1.3.26 and Tomcat 4.1.7, Redhat 7.2
> and have come across an issue with regards to mod_jk.
> 
> Now I assumed that the Ajp13Processors under mod_jk acted as pool to process
> incoming requests. But I hadn't realised that a processor is created per
> socket and then it processes requests on that socket until it is shut down.
> 
> This means that even on a lightly loaded machine I can quite easily have 7-8
> processors (hence threads, hence processes) depending on which apache child
> processes my request.
> 

I would also like to see the thread behaviour for the Ajp13Processor improved.

> I would like to modify the code for the Ajp13Connector as follows, and I
> wonder what the developers think the consequence would be for reasonble
> sized sight (say ~10,000 hits a day).
> 
> 1. Add a maxIdleProcessors, so that short periods of peak activity don't
> leave loads of processors hanging around. I would probably set this value
> quite low (probably 2-3).
> 

I don't mind idle threads hanging around if they get reused.

> 2. I would modify Ajp13Processor so that it processes a single request and
> then recycles itself, rather than waiting for more requests on the same
> socket.
> 

This doesn't work well when apache handles static .shtml pages which have
more than one SSI of a JSP or servlet which gets handled by Tomcat.  I would
rather see an idle timeout.

> I have made these changes and tested them and the behaviour doesn't appear
> to be too bad. Peak activity does slow a little bit, but overall usage of
> resources (i.e. threads) is much lower.
> 
> Any comments?
> 
> Regards,
> Arshad
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to