RE: WHY? Tomcat 5 maxThreads too low, set to 10

2004-02-03 Thread Shapira, Yoav

Howdy,
You might also use two tomcat instances -- much easier to tune.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Parris, Edward G [mailto:[EMAIL PROTECTED]
>Sent: Monday, February 02, 2004 5:38 PM
>To: [EMAIL PROTECTED]
>Subject: WHY? Tomcat 5 maxThreads too low, set to 10
>
>
>I have a single server running Tomcat supporting several webapps. The
web
>apps fall into two categories:
> webapps that require quick response but that use few system resources
> webapps that are expected to process for a long period and consume
large
>amounts of system resources
>
>The goal is to create a tomcat configuration that supports these two
>categories of applications. My difficulty is that the number of
>simultaneous requests supportable within the system's memory
constraints is
>very different.
>
>In the past (Tomcat 4.1.27) I created two HTTP connectors with
different
>minProcessors, maxProcessors and acceptCount values. Web apps were
>registered/accessed via different ports effectively managing the
resources
>of the server. The connector on port 9080 supports a large number of
light-
>weight apps while the connector on 9081 queues up concurrent
heavy-weight
>requests beyond some configurable limit (3).
>
>port="9080"
>   minProcessors="5" maxProcessors="75"
>   enableLookups="true" redirectPort="9443"
>   acceptCount="100" debug="0" connectionTimeout="2"
>   useURIValidationHack="false" disableUploadTimeout="true"
/>
>
>port="9081"
>   minProcessors="3" maxProcessors="3"
>   enableLookups="true" redirectPort="9443"
>   acceptCount="" debug="0" connectionTimeout="0"
>   useURIValidationHack="false" disableUploadTimeout="true"
/>
>
>I tried a similar configuration on Tomcat 5.0.18 but noticed a
ThreadPool
>warning on startup stating that my maxThreads setting was too low and
that
>it would be reset to 10.
>
>WARNING: maxThreads setting (3) too low, set to 10
>
>Does anyone have any ideas how I can rectify this situation? 10
concurrent
>threads is too many (at peak each heavy-weight can consume ~1GB of
memory).
>Simply increasing the memory limits is not going to do it.
>
>Thanks much,
>Ed
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: WHY? Tomcat 5 maxThreads too low, set to 10

2004-02-02 Thread David Rees
On Mon, February 2, 2004 at 6:28 pm, Josh Rehman wrote:
>
> This brings up an interesting point. I'm too lazy to test it, but what
> happens if you tomcat needs more threads than it is allowed? Does the
> user get a 404?

No.  If the acceptCount is set to more than 0, the request will sit in the
accept queue until acceptCount is exceeded at which point the user will
get a connection refused error.

-Dave

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



Re: WHY? Tomcat 5 maxThreads too low, set to 10

2004-02-02 Thread Josh Rehman


David Rees wrote:
1. Recompile Tomcat 5, lowering the hard-coded minimum.
2. Implement a filter or some other type of synchronization in your
servlet which keeps track of the number of currently executing requests
and redirects the user to a different page with a meta refresh letting
them know that their request is being queued until the other outstanding
requests finish.
This brings up an interesting point. I'm too lazy to test it, but what 
happens if you tomcat needs more threads than it is allowed? Does the 
user get a 404?

--
Thanks,
Josh Rehman
Citysearch Toolsdev, 3559
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: WHY? Tomcat 5 maxThreads too low, set to 10

2004-02-02 Thread David Rees
On Mon, February 2, 2004 at 2:38 pm, Parris, Edward G wrote:
> I tried a similar configuration on Tomcat 5.0.18 but noticed a ThreadPool
> warning on startup stating that my maxThreads setting was too low and that
> it would be reset to 10.
>
> WARNING: maxThreads setting (3) too low, set to 10
>
> Does anyone have any ideas how I can rectify this situation? 10 concurrent
> threads is too many (at peak each heavy-weight can consume ~1GB of
> memory). Simply increasing the memory limits is not going to do it.

10 is the hard-coded minimum set in Tomcat.  You have two choices:

1. Recompile Tomcat 5, lowering the hard-coded minimum.
2. Implement a filter or some other type of synchronization in your
servlet which keeps track of the number of currently executing requests
and redirects the user to a different page with a meta refresh letting
them know that their request is being queued until the other outstanding
requests finish.

-Dave

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