tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett Rizk" <>
Subject FW: Connector Pools and Downloads?
Date Mon, 16 Jul 2001 16:15:22 GMT

-----Original Message-----
From: GOMEZ Henri []
Sent: Monday, July 16, 2001 5:08 AM
Subject: RE: Connector Pools and Downloads?

> Michael Rimov [] wrote :
>A while back I created a download manager so that I can provide
>security, logging and management.  The download manager actually sends
>file through the servlet response after setting the appropriate content

>types and length.  So far so good.....

>				The Problem

>This is causing a serious problem under heavy loads.  In the case of

>the Apache --> Resin connectors came from a fixed block of connections

>a pool.  Since a multi-megabyte download can take a long time, the 
>connection pool can get filled up rather quickly, and all subsequent 
>servlet responses just crash, or hang for minutes at a time per

What do you call heavy load ? You can setup Tomcat to handle up to 
100 ajp13 threads (and even more) each one handling one download
In that case you'll have 100 Apache forked childs forwarding download
servlet engine to client (browser).

>				What to do?
>Since uploads and downloads seem to be a pretty common entity that
>desire for the servlet containers to do, I'm kind of at a loss on how
to go

>about this.  AFAICT, the tomcat-->Apache connector is going to have the

>same problems. [If I'm misreading this, I'd LOVE to be corrected! :-)

>if it isn't a problem is this true for both ajp12 and ajp13? (and ajp14
>be)? )]

You'll get the problem before that, at one time you Web-server (Apache
other one) will have no more process available to handle the download. 

Imagine you setup Apache Web-server to have up to 250 childs (forked or
25*10. You set Tomcat to have also 250 ajp13/ajp14 threads available. 
The 251th client will be rejected by Apache Web-Server before even
trying to
speak with Tomcat server :!

I suppose I can reference count the download manager and only allow so
downloads, but then people are going to go elsewhere instead of wait for
download to be available.

Don't forget that mod_jk support load-balancing and you could use 2 or
Tomcat using ajp13/ajp14 behind your Apache Web-Server....

View raw message