-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Phineas,

On 7/24/12 7:19 PM, Phineas Dole wrote:
> Test configuration: <Connector port="8080"
> protocol="org.apache.coyote.http11.Http11NioProtocol" 
> acceptCount="10240" numThreads="1024"

numThreads is not a recognized configuration attribute. Read the docs:
http://tomcat.apache.org/tomcat-7.0-doc/config/http.html

> I have increased somaxconn.

Are you sure?

> The error has become very consistent. I can trigger it by
> restarting tomcat and then running the test. Typically it takes <5s
> for ab to terminate. (Though ab states that several thousand
> requests have completed by that point, which appears true from the
> access logs).

With a trivial servlet, you should be able to handle a *lot* of load.
Are you testing on localhost (i.e. both ab and Tomcat run on the same
machine)?

> The high (10240) acceptCount seems to be the reason for the 
> consistent error. Decreasing it seems to make things more stable.

In general, I would expect that. There's not a really good reason for
a high acceptCount. If your machine can't handle a huge amount of
load, don't make a whole bunch of clients get in a huge line: just
refuse their connections.

> In fact, setting acceptCount="5" and connectionTimeout="-1" seems
> to delay the error by a huge amount, but it still occurs. Also,
> the connectionTimeout resolves "length" and "exception" errors 
> occasionally reported by ab. I presume this is related more to how 
> the client (ab) operates and not tomcat itself.

Perhaps. If it's appropriate for your testing, try using "-k" to
enable HTTP keepalive to see if you get better throughput (and fewer
errors).

> The acceptCount is counter-intuitive to me. Was this the intended 
> solution you had in mind.

No: I think you should change maxThreads. Better yet, use an
<Executor> so you have better control over everything. TC7 always uses
an <Executor> implicitly, but there are fewer configuration options
when doing it through the <Connector>.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlAQEn4ACgkQ9CaO5/Lv0PA1RACgpOoW6lPrO4vEDA8/kMnKFtKk
7QoAnA7G7uz2wD2YmoLmuHUKA3sp4W3l
=RCwk
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to