tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arieh Markel <>
Subject Re: Problem to limit the number of connections
Date Fri, 08 Dec 2000 16:20:10 GMT

> Mailing-List: contact; run by ezmlm
> list-help: <>
> list-unsubscribe: <>
> list-post: <>
> Delivered-To: mailing list
> Delivered-To: moderator for
> From: Sophie Lemonnier <>
> To:
> Subject: Problem to limit the number of connections
> X-Spam-Rating: 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?


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"
            <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"/>

 Arieh Markel		                Sun Microsystems Inc.
 Network Storage                        500 Eldorado Blvd. MS UBRM11-194
 e-mail: arieh.markel@sun.COM           Broomfield, CO 80021
 Let's go Panthers !!!!                 Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)

View raw message