Dear Arieh,
Thank you for your response but I am afraid it does not work!
I have entered the following lines in my server.xml file :
<Connector className="org.apache.tomcat.service.PoolTcpConnector">
<Parameter name="handler"
value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
<Parameter name="port" value="8008"/>
<Parameter name="thread_pool" value="on"/>
<Parameter name="max_threads" value="6"/>
<Parameter name="max_spare_threads" value="4"/>
<Parameter name="min_spare_threads" value="2"/>
</Connector>
I have chosen very small values to test it easilly.
Unfortunately, I have managed to perform 8 connections to my servlet....
Do you have further ideas? Thank you!
Sophie.
Arieh Markel a écrit :
> > 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)