> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> Delivered-To: moderator for [EMAIL PROTECTED]
> From: Sophie Lemonnier <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Problem to limit the number of connections
> X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
>
> Hello,
>
> I have a machine with little ressouces and with other applications than
> tomcat are running.
> Consequently, I would like to prevent too many clients to connect to
> tomcat...
> I haven't managed yet to limit the number of connections....
> Can anyone help me?
Sophie,
you did not mention the version of Tomcat that you are using.
In any case, I believe that for 3.2, the solution is in properties for the
org.apache.tomcat.service.PoolTcpConnector class:
the properties below control the number of threads (which will be associated
with inbound socket connections) that the connector has.
public static final String THREAD_POOL = "thread_pool";
public static final String MAX_THREADS = "max_threads";
public static final String MAX_SPARE_THREADS = "max_spare_threads";
public static final String MIN_SPARE_THREADS = "min_spare_threads";
What you need to do is modify your server.xml to explicitly set the
property values that are appropriate for you:
(Here is an example from an old server.xml I was using)
<Connector className="org.apache.tomcat.service.PoolTcpConnector">
<Parameter name="handler"
value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
<Parameter name="port" value="8180"/>
<Parameter name="thread_pool" value="on"/>
<Parameter name="max_threads" value="100"/>
<Parameter name="max_spare_threads" value="30"/>
<Parameter name="min_spare_threads" value="10"/>
</Connector>
Arieh
--
Arieh Markel Sun Microsystems Inc.
Network Storage 500 Eldorado Blvd. MS UBRM11-194
e-mail: [EMAIL PROTECTED] Broomfield, CO 80021
Let's go Panthers !!!! Phone: (303) 272-8547 x78547
(e-mail me with subject SEND PUBLIC KEY to get public key)