You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jorge Sopena <js...@sidsa.es> on 2004/09/14 17:38:20 UTC

How many connections can be made to Tomcat on Windows?

Hi everybody,

I'm having a problem with the maximun connections in Tomcat.
In theory, the number of connections accepted by Tomcat is determined by 
the <Connector> elements in the server.xml configuration file. The 
maxProcessors attribute sets the total number of threads that can run 
simultaneously and the acceptCount attribute controls the number of 
requests that may be queued waiting for a connection.

I've done my own program to send hundreds of requests concurrently, but 
the response in the majority is 
"Exception:java.net.ConnectException:connection refuse"
I did several tests, and I realized that if I send a request each 
20mseconds I can send around 200 requests without problems.
But if I send, for example 20 requests uninterruptedly, 4 or 5 requets 
are rejected with java.net.ConnectException.
If I increae the number of requests the problem is even worst.

I'm using tomcat 5.0, and the configuration in my server.xml is:
  <Connector port="8080"  maxThreads="300" minSpareThreads="25" 
maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               debug="0" connectionTimeout="20000"
               disableUploadTimeout="true" />

So, is the problem because of Tomcat and I should configure anything 
else? or
should I customize something in the JVM or Windows?

My goal is to be able to serve 1000 requests/second. Any hint how to do it?

Thanks, in advance.

Jorge sopena


Re: AW: How many connections can be made to Tomcat on Windows?

Posted by Kelly Denehy <kd...@gmail.com>.
On Tue, 14 Sep 2004 19:00:06 +0200, SH Solutions <sh...@gmx.net> wrote:
> Hi
> 
> > in the even you're using windows professional, it is limited to 10 inbound
> connections, which is easy to overlook and forget.
> 
> NO.
> The limit of 10 inbound connections apply to _windows shares only_. It's a
> limitation to prevent usage of "professional" as "server".
> 
> However, the tcp/ip stack of professional and server are the _SAME_ and
> there is _NO_ limitation on incoming or outgoing connections, as long as the
> hardware can handle them.
> 
> One exception: Windows xp sp2 has a limit for the rate of creating outgoing
> connection, which is suppost to slow down worms, but it can be disabled in
> registry. However, this does NOT apply to incoming connections.
> 
> However, 1000 request/second is propably way to much for one system. Buy two
> and use load balancers, or do very good cashing in your webapp. But do not
> access the database for every page hit.
> 
> Regards,
>   Steffen
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 

>From a *technical* standpoint, you are correct regarding socket
connections.  From a *legal* standpoint, however, the EULA for the
Workstation product limits you to 10 concurrent socket connections, in
order to try to force you to use Server instead.  MS changed this back
around NT 4.0 because people were putting http servers on NT
Workstation instead of NT Server to save money.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How many connections can be made to Tomcat on Windows?

Posted by Peter Lin <wo...@gmail.com>.
are you using a single system as the client or multiple?  I've been
able to simulate upward of 100 threads in jmeter against tomcat for a
static file using my Gateway laptop which is a 1.4ghz PentiumM with
1Gb RAM. beyond 100 threads, the throughput tends to go down. I don't
remember the exact settings I used, but it was roughly

max 150
min 100
spare 50

since your webpage hits the database, I would suggest using JMeter to
test your database first and figure out the peak queries/second.  Even
if you have 4 tomcat servers on the front end, if your database can
only handle 400 queries/sec, it only going to kill the database. at
that point, tomcat is just tell the user internal server error.

I hope that helps

peter


On Wed, 15 Sep 2004 11:11:07 +0200, Jorge Sopena <js...@sidsa.es> wrote:
> 
> My case is teh first one, there will be peaks of requests.
> I mean it's quite likely that in any moment I could receive this
> quantity of requests.
> For example, I very likely scenario is to receive in 2-3 minutes around
> 100000 requests, what is in average 500req/second
> 
> I know I will need more hardware for the final environment.
> But my current problem is that I can't get connections with Tomcat in a
> quickly way unless I send them separately.
> I can send 15 requests concurrently, then I get
> java.net.ConnectionException.
> I knew I wouldn´t reach my goal in my machine (Pentimu IV, 2.4GHz,
> 512MB) but I find the results very poor.
> 
> So I wondered if Tomcat can reach to this numbers in another environment?
> 
> Thanks
> 
> Jorge
> 
> 
> 
> 
> Elmar Haneke wrote:
> 
> >> Thanks for the calculations, but more exactly I want the server to
> >>  attend 1000 requests/second. I mean I don't want any of those
> >> requests to be rejected. It's probably the response time were
> >> several seconds, but with better hardware I could manage that.
> >
> >
> > Is it your intention to handle the (perhaps rare) case where 1000
> > requests are coming within the same second or are you planning to
> > manage 1000 Requests every second (60000 requests per minute)?
> >
> > In the second case it won't help if each request remains active
> > several seconds - this would cause to have several thousand
> > connections open simultaneously - an very hard job for any kernel.
> >
> > Elmar
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> 
> --
> ==============================================================
> Jorge Sopena Torres
> SIDSA
> (Semiconductores Investigación y Diseño, S.A.)
> 
> Parque Tecnológico de Madrid
> c/ Torres Quevedo, nº 1
> 28760 TRES CANTOS (Madrid) (SPAIN)
> 
> Phone : +34 91 803 5052
> Fax:    +34 91 803 9557
> 
> e-mail: jsopena@sidsa.es
> URL: http://www.sidsa.com
> 
> ==============================================================
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How many connections can be made to Tomcat on Windows?

Posted by Jorge Sopena <js...@sidsa.es>.
My case is teh first one, there will be peaks of requests.
I mean it's quite likely that in any moment I could receive this 
quantity of requests.
For example, I very likely scenario is to receive in 2-3 minutes around 
100000 requests, what is in average 500req/second

I know I will need more hardware for the final environment.
But my current problem is that I can't get connections with Tomcat in a 
quickly way unless I send them separately.
I can send 15 requests concurrently, then I get 
java.net.ConnectionException.
I knew I wouldn´t reach my goal in my machine (Pentimu IV, 2.4GHz, 
512MB) but I find the results very poor.

So I wondered if Tomcat can reach to this numbers in another environment?

Thanks

Jorge


Elmar Haneke wrote:

>> Thanks for the calculations, but more exactly I want the server to
>>  attend 1000 requests/second. I mean I don't want any of those
>> requests to be rejected. It's probably the response time were
>> several seconds, but with better hardware I could manage that.
>
>
> Is it your intention to handle the (perhaps rare) case where 1000
> requests are coming within the same second or are you planning to
> manage 1000 Requests every second (60000 requests per minute)?
>
> In the second case it won't help if each request remains active
> several seconds - this would cause to have several thousand
> connections open simultaneously - an very hard job for any kernel.
>
> Elmar
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>

-- 
==============================================================
Jorge Sopena Torres
SIDSA
(Semiconductores Investigación y Diseño, S.A.)

Parque Tecnológico de Madrid
c/ Torres Quevedo, nº 1
28760 TRES CANTOS (Madrid) (SPAIN)

Phone : +34 91 803 5052
Fax:    +34 91 803 9557

e-mail: jsopena@sidsa.es
URL: http://www.sidsa.com

============================================================== 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How many connections can be made to Tomcat on Windows?

Posted by Elmar Haneke <el...@haneke.de>.
> Thanks for the calculations, but more exactly I want the server to
>  attend 1000 requests/second. I mean I don't want any of those
> requests to be rejected. It's probably the response time were
> several seconds, but with better hardware I could manage that.

Is it your intention to handle the (perhaps rare) case where 1000
requests are coming within the same second or are you planning to
manage 1000 Requests every second (60000 requests per minute)?

In the second case it won't help if each request remains active
several seconds - this would cause to have several thousand
connections open simultaneously - an very hard job for any kernel.

Elmar

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re[2]: How many connections can be made to Tomcat on Windows?

Posted by Eugene <j....@infosatgeomatica.com>.
Yeah, but some applications unfortunately designed to run JUST on
Windows platform - thats a good reazon to run this suxx. In my home
computer I have RH9, but on my work I'm working with Windows:(

Tuesday, September 14, 2004, 9:37:51 PM, you wrote:

> No, it doesn't mean that(although it was funny).
> What it means is to run Unix/Linux.  Winblows sux!

> -----Original Message-----
> From: Peter Lin [mailto:woolfel@gmail.com] 
> Sent: Tuesday, September 14, 2004 10:10 AM
> To: Tomcat Users List
> Subject: Re: How many connections can be made to Tomcat on Windows?

> so does this mean Intel should donate some hardware to Apache for
> suggesting users buy more hardware :)

> sorry, couldn't resist.

> if you provide more information about what the page does (without
> revealing sensitive info), you'll get more detailed response.
> Otherwise, we're just shooting darts with a blind fold, in a darkroom
> with the board 100 yards away.

> peter



> On Tue, 14 Sep 2004 19:04:40 +0200, Mladen Turk <mt...@apache.org> wrote:
>> Jorge Sopena wrote:
>> > Yes, I'm running Tomcat on a windows server, but I'm not in a production
>> > environment yet.
>> >
>> > What do you mean with "inbounds connections"?
>> > I could test that sending requests every 20ms there were around 200
>> > sockets in the system (with netstat command)
>> 
>> Not sure what tool you are using for profiling (MS Stress?).
>> Your test also doesn't show nothing (useful). It only shows that
>> you combination of application/hardware/etc cannot deliver the context
>> inside 20ms.
>> Increase the interval and when you stop receiving exceptions, that's the
>> workload of your hardware. Now, check the SpecMark for your computer,
>> and order a new box that will have a SpecMark high enough to drive your
>> application :).
>> 
>> >
>> > Any way, where could I look this "inbound limit" in a Windows system?
>> > Maybe that is a hint to find de final answer.
>> >
>> 
>> Well, you have a 200 opened connections (those are likely 100 if you
>> are testing from the same box, but I hope you are not doing that).
>> Also if there is a limit (non-server products has max 10) it wouldn't
>> manifest as java exception, but rather directly to the client, never
>> reaching tomcat.
>> 
>> Regards,
>> MT.
>> 
>> 
>> 
>>

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



-- 
Best regards,
 Eugene                            mailto:j.subscribe@infosatgeomatica.com


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How many connections can be made to Tomcat on Windows?

Posted by Jorge Sopena <js...@sidsa.es>.
Ok,
At the beginning my page had to do two queries to DB, and I found this 
connection problem.
At the end my servlet does nothing, just reply a string "CONNECTED".
On the other side my client test program creates several threads (is a 
parameter) and in its run method sends the request to this servlet.

And the results are quite bad, if I create more than 15 threads some 
requests are answered with "java.net.ConnectionException".

I didn't want to reach to 1000 req/s in my current hardware but I 
thought I could expect better results.
Anyway, I'll test Tomcat with JMeter and I'll see if the results are better.

If someone can give me any hint , I'll be grateful

Jorge

Peter Lin wrote:

>so does this mean Intel should donate some hardware to Apache for
>suggesting users buy more hardware :)
>
>sorry, couldn't resist.
>
>if you provide more information about what the page does (without
>revealing sensitive info), you'll get more detailed response.
>Otherwise, we're just shooting darts with a blind fold, in a darkroom
>with the board 100 yards away.
>
>peter
>
>
>
>On Tue, 14 Sep 2004 19:04:40 +0200, Mladen Turk <mt...@apache.org> wrote:
>  
>
>>Jorge Sopena wrote:
>>    
>>
>>>Yes, I'm running Tomcat on a windows server, but I'm not in a production
>>>environment yet.
>>>
>>>What do you mean with "inbounds connections"?
>>>I could test that sending requests every 20ms there were around 200
>>>sockets in the system (with netstat command)
>>>      
>>>
>>Not sure what tool you are using for profiling (MS Stress?).
>>Your test also doesn't show nothing (useful). It only shows that
>>you combination of application/hardware/etc cannot deliver the context
>>inside 20ms.
>>Increase the interval and when you stop receiving exceptions, that's the
>>workload of your hardware. Now, check the SpecMark for your computer,
>>and order a new box that will have a SpecMark high enough to drive your
>>application :).
>>
>>    
>>
>>>Any way, where could I look this "inbound limit" in a Windows system?
>>>Maybe that is a hint to find de final answer.
>>>
>>>      
>>>
>>Well, you have a 200 opened connections (those are likely 100 if you
>>are testing from the same box, but I hope you are not doing that).
>>Also if there is a limit (non-server products has max 10) it wouldn't
>>manifest as java exception, but rather directly to the client, never
>>reaching tomcat.
>>
>>Regards,
>>MT.
>>
>>
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>  
>

-- 
==============================================================
Jorge Sopena Torres
SIDSA
(Semiconductores Investigación y Diseño, S.A.)

Parque Tecnológico de Madrid
c/ Torres Quevedo, nº 1
28760 TRES CANTOS (Madrid) (SPAIN)

Phone : +34 91 803 5052
Fax:    +34 91 803 9557

e-mail: jsopena@sidsa.es
URL: http://www.sidsa.com

============================================================== 


RE: How many connections can be made to Tomcat on Windows?

Posted by John Najarian <j-...@earthlink.net>.
No, it doesn't mean that(although it was funny).
What it means is to run Unix/Linux.  Winblows sux!

-----Original Message-----
From: Peter Lin [mailto:woolfel@gmail.com] 
Sent: Tuesday, September 14, 2004 10:10 AM
To: Tomcat Users List
Subject: Re: How many connections can be made to Tomcat on Windows?

so does this mean Intel should donate some hardware to Apache for
suggesting users buy more hardware :)

sorry, couldn't resist.

if you provide more information about what the page does (without
revealing sensitive info), you'll get more detailed response.
Otherwise, we're just shooting darts with a blind fold, in a darkroom
with the board 100 yards away.

peter



On Tue, 14 Sep 2004 19:04:40 +0200, Mladen Turk <mt...@apache.org> wrote:
> Jorge Sopena wrote:
> > Yes, I'm running Tomcat on a windows server, but I'm not in a production
> > environment yet.
> >
> > What do you mean with "inbounds connections"?
> > I could test that sending requests every 20ms there were around 200
> > sockets in the system (with netstat command)
> 
> Not sure what tool you are using for profiling (MS Stress?).
> Your test also doesn't show nothing (useful). It only shows that
> you combination of application/hardware/etc cannot deliver the context
> inside 20ms.
> Increase the interval and when you stop receiving exceptions, that's the
> workload of your hardware. Now, check the SpecMark for your computer,
> and order a new box that will have a SpecMark high enough to drive your
> application :).
> 
> >
> > Any way, where could I look this "inbound limit" in a Windows system?
> > Maybe that is a hint to find de final answer.
> >
> 
> Well, you have a 200 opened connections (those are likely 100 if you
> are testing from the same box, but I hope you are not doing that).
> Also if there is a limit (non-server products has max 10) it wouldn't
> manifest as java exception, but rather directly to the client, never
> reaching tomcat.
> 
> Regards,
> MT.
> 
> 
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How many connections can be made to Tomcat on Windows?

Posted by Mladen Turk <mt...@apache.org>.
Peter Lin wrote:

> joking aside, my experience is consistent with Mladen's. my
> recommendation as usual is to measure the performance of a given page
> and know exactly how long it takes to process the page, get data and
> so on.
> 
> once you have that, you should be able to predict the performance
> fairly accurately.
> 
> having said that. it doesn't hurt to have more hardware :)
>

I agree. From my experience the high-end application that needs
to access the database, maintain session, generate pictures and
deliver all that to the client takes about 500ms at the current
high level CPU (Xeon 3.4GHz).

Interesting is that almost the same response time is constant.
Taking Moore law into equation for hardware, pretty much is the
same with the software. As hardware gets faster, the applications
tend to offer more features.

So if someone wishes to handle a 1000 requests/second it would be
over 3.5 million requests/hour, and that is pretty serious thought.
Also for 1000 request/sec you will be able to deliver only around
8K of data on 100Mbps network, and what would be the purpose of
such a page (not counted requests and headers)?

Regards,
MT.


Re: How many connections can be made to Tomcat on Windows?

Posted by Peter Lin <wo...@gmail.com>.
man how do I get in on that deal. I could use more servers at home to
play with.

joking aside, my experience is consistent with Mladen's. my
recommendation as usual is to measure the performance of a given page
and know exactly how long it takes to process the page, get data and
so on.

once you have that, you should be able to predict the performance
fairly accurately.

having said that. it doesn't hurt to have more hardware :)

peter



On Tue, 14 Sep 2004 19:38:31 +0200, Mladen Turk <mt...@apache.org> wrote:
> Peter Lin wrote:
> 
> > so does this mean Intel should donate some hardware to Apache for
> > suggesting users buy more hardware :)
> >
> 
> You are wrong. We have a sneak deal with Sun. Each month a
> new SunFire is at my doorsteps.
> 
> Look, on my laptop (2.2GHz P4/1GB) the
> /servlets-examples/HelloWorldExample is cca 1.7 ms.
> no mater if I have a single or 60 concurrent connections.
> 
> It all depends what are you testing.
> If my application takes a 50ms to deliver, and I'm
> hitting the TC in 20ms intervals...
> I can either buy faster hardware or optimize application.
> 
> > sorry, couldn't resist.
> >
> 
> me too :).
> 
> MT.
> 
> 
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How many connections can be made to Tomcat on Windows?

Posted by Mladen Turk <mt...@apache.org>.
Peter Lin wrote:

> so does this mean Intel should donate some hardware to Apache for
> suggesting users buy more hardware :)
> 

You are wrong. We have a sneak deal with Sun. Each month a
new SunFire is at my doorsteps.

Look, on my laptop (2.2GHz P4/1GB) the
/servlets-examples/HelloWorldExample is cca 1.7 ms.
no mater if I have a single or 60 concurrent connections.

It all depends what are you testing.
If my application takes a 50ms to deliver, and I'm
hitting the TC in 20ms intervals...
I can either buy faster hardware or optimize application.

> sorry, couldn't resist.
> 

me too :).

MT.


Re: How many connections can be made to Tomcat on Windows?

Posted by Peter Lin <wo...@gmail.com>.
so does this mean Intel should donate some hardware to Apache for
suggesting users buy more hardware :)

sorry, couldn't resist.

if you provide more information about what the page does (without
revealing sensitive info), you'll get more detailed response.
Otherwise, we're just shooting darts with a blind fold, in a darkroom
with the board 100 yards away.

peter



On Tue, 14 Sep 2004 19:04:40 +0200, Mladen Turk <mt...@apache.org> wrote:
> Jorge Sopena wrote:
> > Yes, I'm running Tomcat on a windows server, but I'm not in a production
> > environment yet.
> >
> > What do you mean with "inbounds connections"?
> > I could test that sending requests every 20ms there were around 200
> > sockets in the system (with netstat command)
> 
> Not sure what tool you are using for profiling (MS Stress?).
> Your test also doesn't show nothing (useful). It only shows that
> you combination of application/hardware/etc cannot deliver the context
> inside 20ms.
> Increase the interval and when you stop receiving exceptions, that's the
> workload of your hardware. Now, check the SpecMark for your computer,
> and order a new box that will have a SpecMark high enough to drive your
> application :).
> 
> >
> > Any way, where could I look this "inbound limit" in a Windows system?
> > Maybe that is a hint to find de final answer.
> >
> 
> Well, you have a 200 opened connections (those are likely 100 if you
> are testing from the same box, but I hope you are not doing that).
> Also if there is a limit (non-server products has max 10) it wouldn't
> manifest as java exception, but rather directly to the client, never
> reaching tomcat.
> 
> Regards,
> MT.
> 
> 
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How many connections can be made to Tomcat on Windows?

Posted by Mladen Turk <mt...@apache.org>.
Jorge Sopena wrote:
> Yes, I'm running Tomcat on a windows server, but I'm not in a production 
> environment yet.
> 
> What do you mean with "inbounds connections"?
> I could test that sending requests every 20ms there were around 200 
> sockets in the system (with netstat command)

Not sure what tool you are using for profiling (MS Stress?).
Your test also doesn't show nothing (useful). It only shows that
you combination of application/hardware/etc cannot deliver the context
inside 20ms.
Increase the interval and when you stop receiving exceptions, that's the
workload of your hardware. Now, check the SpecMark for your computer,
and order a new box that will have a SpecMark high enough to drive your
application :).

> 
> Any way, where could I look this "inbound limit" in a Windows system? 
> Maybe that is a hint to find de final answer.
> 

Well, you have a 200 opened connections (those are likely 100 if you
are testing from the same box, but I hope you are not doing that).
Also if there is a limit (non-server products has max 10) it wouldn't
manifest as java exception, but rather directly to the client, never
reaching tomcat.

Regards,
MT.

Re: How many connections can be made to Tomcat on Windows?

Posted by Peter Lin <wo...@gmail.com>.
windows server shouldn't have any limit, though you can tune the
settings to allow for a higher number of concurrent connections. So
are you testing with a static html file or a simple image file like
png/gif/jpg.

if it's a real page, one thing I often do is measure the time it takes
to process the page. To insure all connections are accepted you're
choices are to increase the number of threads or the buffer.

that all depends on the memory of the system and the type of
application your testing. I can't really give any hard numbers, since
I don't know what kind of webpage you're testing. The other thing I do
when stress testing tomcat, is to set the heap to different sizes and
run a whole series of tests with increasing number of concurrent
requests and different page sizes. I hope that helps

peter


On Tue, 14 Sep 2004 18:46:14 +0200, Jorge Sopena <js...@sidsa.es> wrote:
> Hi Peter,
> 
> Yes, I'm running Tomcat on a windows server, but I'm not in a production
> environment yet.
> 
> What do you mean with "inbounds connections"?
> I could test that sending requests every 20ms there were around 200
> sockets in the system (with netstat command)
> My problem is when the requests reach very quickly to the server, and it
> responses with java.net.Connection Exception very early.
> 
> Thanks for the calculations, but more exactly I want the server to
> attend 1000 requests/second. I mean I don't want any of those requests
> to be rejected. It's probably the response time were several seconds,
> but with better hardware I could manage that.
> 
> Any way, where could I look this "inbound limit" in a Windows system?
> Maybe that is a hint to find de final answer.
> 
> Thanks,
> 
> Jorge Sopena
> 
> 
> 
> Peter Lin wrote:
> 
> >just out of curiousit, you're running Tomcat on windows server right?
> >
> >in the even you're using windows professional, it is limited to 10
> >inbound connections, which is easy to overlook and forget.
> >
> >I've easily gone over 1000req/sec for static files. For real pages
> >that hit the database, that's another story. Unless you're doing some
> >caching on the web tier, it's unlikely a 4CPU database server can
> >handle that many queries per second. The only way a webpage that gets
> >data from the database for every request to reach 1000 req/sec is if
> >the queries themselves take 50ms or less.
> >
> >on a 4 cpu box
> >1000ms/50ms = 200 queries/second
> >200 queries/sec X 4 = 800.
> >
> >Does that help?
> >
> >peter
> >
> >
> >On Tue, 14 Sep 2004 17:38:20 +0200, Jorge Sopena <js...@sidsa.es> wrote:
> >
> >
> >>Hi everybody,
> >>
> >>I'm having a problem with the maximun connections in Tomcat.
> >>In theory, the number of connections accepted by Tomcat is determined by
> >>the <Connector> elements in the server.xml configuration file. The
> >>maxProcessors attribute sets the total number of threads that can run
> >>simultaneously and the acceptCount attribute controls the number of
> >>requests that may be queued waiting for a connection.
> >>
> >>I've done my own program to send hundreds of requests concurrently, but
> >>the response in the majority is
> >>"Exception:java.net.ConnectException:connection refuse"
> >>I did several tests, and I realized that if I send a request each
> >>20mseconds I can send around 200 requests without problems.
> >>But if I send, for example 20 requests uninterruptedly, 4 or 5 requets
> >>are rejected with java.net.ConnectException.
> >>If I increae the number of requests the problem is even worst.
> >>
> >>I'm using tomcat 5.0, and the configuration in my server.xml is:
> >> <Connector port="8080"  maxThreads="300" minSpareThreads="25"
> >>maxSpareThreads="75"
> >>              enableLookups="false" redirectPort="8443" acceptCount="100"
> >>              debug="0" connectionTimeout="20000"
> >>              disableUploadTimeout="true" />
> >>
> >>So, is the problem because of Tomcat and I should configure anything
> >>else? or
> >>should I customize something in the JVM or Windows?
> >>
> >>My goal is to be able to serve 1000 requests/second. Any hint how to do it?
> >>
> >>Thanks, in advance.
> >>
> >>Jorge sopena
> >>
> >>
> >>
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> >
> >
> 
> --
> ==============================================================
> Jorge Sopena Torres
> SIDSA
> (Semiconductores Investigación y Diseño, S.A.)
> 
> Parque Tecnológico de Madrid
> c/ Torres Quevedo, nº 1
> 28760 TRES CANTOS (Madrid) (SPAIN)
> 
> Phone : +34 91 803 5052
> Fax:    +34 91 803 9557
> 
> e-mail: jsopena@sidsa.es
> URL: http://www.sidsa.com
> 
> ==============================================================
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How many connections can be made to Tomcat on Windows?

Posted by Jorge Sopena <js...@sidsa.es>.
Hi Peter,

Yes, I'm running Tomcat on a windows server, but I'm not in a production 
environment yet.

What do you mean with "inbounds connections"?
I could test that sending requests every 20ms there were around 200 
sockets in the system (with netstat command)
My problem is when the requests reach very quickly to the server, and it 
responses with java.net.Connection Exception very early.

Thanks for the calculations, but more exactly I want the server to 
attend 1000 requests/second. I mean I don't want any of those requests 
to be rejected. It's probably the response time were several seconds, 
but with better hardware I could manage that.

Any way, where could I look this "inbound limit" in a Windows system? 
Maybe that is a hint to find de final answer.

Thanks,

Jorge Sopena

Peter Lin wrote:

>just out of curiousit, you're running Tomcat on windows server right?
>
>in the even you're using windows professional, it is limited to 10
>inbound connections, which is easy to overlook and forget.
>
>I've easily gone over 1000req/sec for static files. For real pages
>that hit the database, that's another story. Unless you're doing some
>caching on the web tier, it's unlikely a 4CPU database server can
>handle that many queries per second. The only way a webpage that gets
>data from the database for every request to reach 1000 req/sec is if
>the queries themselves take 50ms or less.
>
>on a 4 cpu box
>1000ms/50ms = 200 queries/second
>200 queries/sec X 4 = 800.
>
>Does that help?
>
>peter
>
>
>On Tue, 14 Sep 2004 17:38:20 +0200, Jorge Sopena <js...@sidsa.es> wrote:
>  
>
>>Hi everybody,
>>
>>I'm having a problem with the maximun connections in Tomcat.
>>In theory, the number of connections accepted by Tomcat is determined by
>>the <Connector> elements in the server.xml configuration file. The
>>maxProcessors attribute sets the total number of threads that can run
>>simultaneously and the acceptCount attribute controls the number of
>>requests that may be queued waiting for a connection.
>>
>>I've done my own program to send hundreds of requests concurrently, but
>>the response in the majority is
>>"Exception:java.net.ConnectException:connection refuse"
>>I did several tests, and I realized that if I send a request each
>>20mseconds I can send around 200 requests without problems.
>>But if I send, for example 20 requests uninterruptedly, 4 or 5 requets
>>are rejected with java.net.ConnectException.
>>If I increae the number of requests the problem is even worst.
>>
>>I'm using tomcat 5.0, and the configuration in my server.xml is:
>> <Connector port="8080"  maxThreads="300" minSpareThreads="25"
>>maxSpareThreads="75"
>>              enableLookups="false" redirectPort="8443" acceptCount="100"
>>              debug="0" connectionTimeout="20000"
>>              disableUploadTimeout="true" />
>>
>>So, is the problem because of Tomcat and I should configure anything
>>else? or
>>should I customize something in the JVM or Windows?
>>
>>My goal is to be able to serve 1000 requests/second. Any hint how to do it?
>>
>>Thanks, in advance.
>>
>>Jorge sopena
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>  
>

-- 
==============================================================
Jorge Sopena Torres
SIDSA
(Semiconductores Investigación y Diseño, S.A.)

Parque Tecnológico de Madrid
c/ Torres Quevedo, nº 1
28760 TRES CANTOS (Madrid) (SPAIN)

Phone : +34 91 803 5052
Fax:    +34 91 803 9557

e-mail: jsopena@sidsa.es
URL: http://www.sidsa.com

============================================================== 


AW: How many connections can be made to Tomcat on Windows?

Posted by SH Solutions <sh...@gmx.net>.
Hi

> in the even you're using windows professional, it is limited to 10 inbound
connections, which is easy to overlook and forget.

NO.
The limit of 10 inbound connections apply to _windows shares only_. It's a
limitation to prevent usage of "professional" as "server".

However, the tcp/ip stack of professional and server are the _SAME_ and
there is _NO_ limitation on incoming or outgoing connections, as long as the
hardware can handle them.

One exception: Windows xp sp2 has a limit for the rate of creating outgoing
connection, which is suppost to slow down worms, but it can be disabled in
registry. However, this does NOT apply to incoming connections.

However, 1000 request/second is propably way to much for one system. Buy two
and use load balancers, or do very good cashing in your webapp. But do not
access the database for every page hit.

Regards,
  Steffen


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How many connections can be made to Tomcat on Windows?

Posted by Peter Lin <wo...@gmail.com>.
just out of curiousit, you're running Tomcat on windows server right?

in the even you're using windows professional, it is limited to 10
inbound connections, which is easy to overlook and forget.

I've easily gone over 1000req/sec for static files. For real pages
that hit the database, that's another story. Unless you're doing some
caching on the web tier, it's unlikely a 4CPU database server can
handle that many queries per second. The only way a webpage that gets
data from the database for every request to reach 1000 req/sec is if
the queries themselves take 50ms or less.

on a 4 cpu box
1000ms/50ms = 200 queries/second
200 queries/sec X 4 = 800.

Does that help?

peter


On Tue, 14 Sep 2004 17:38:20 +0200, Jorge Sopena <js...@sidsa.es> wrote:
> Hi everybody,
> 
> I'm having a problem with the maximun connections in Tomcat.
> In theory, the number of connections accepted by Tomcat is determined by
> the <Connector> elements in the server.xml configuration file. The
> maxProcessors attribute sets the total number of threads that can run
> simultaneously and the acceptCount attribute controls the number of
> requests that may be queued waiting for a connection.
> 
> I've done my own program to send hundreds of requests concurrently, but
> the response in the majority is
> "Exception:java.net.ConnectException:connection refuse"
> I did several tests, and I realized that if I send a request each
> 20mseconds I can send around 200 requests without problems.
> But if I send, for example 20 requests uninterruptedly, 4 or 5 requets
> are rejected with java.net.ConnectException.
> If I increae the number of requests the problem is even worst.
> 
> I'm using tomcat 5.0, and the configuration in my server.xml is:
>  <Connector port="8080"  maxThreads="300" minSpareThreads="25"
> maxSpareThreads="75"
>               enableLookups="false" redirectPort="8443" acceptCount="100"
>               debug="0" connectionTimeout="20000"
>               disableUploadTimeout="true" />
> 
> So, is the problem because of Tomcat and I should configure anything
> else? or
> should I customize something in the JVM or Windows?
> 
> My goal is to be able to serve 1000 requests/second. Any hint how to do it?
> 
> Thanks, in advance.
> 
> Jorge sopena
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org