-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ped,
ped wrote:
> I would think that I should be able to increase the number of threads
> available to Tomcat to prevent this problem (I'm not saying that is the
> correct solution to my problem - I fully understand that our design is the
> root of this problem).
If you have many clients:
1. borrowing db connections
2. executing queries
3. committing transactions and returning the connections to the pool
...then you have very nondeterministic behavior.
If every request requires a db connection (either from the pool, or from
the session, or wherever you store it), and you have fewer db
connections available than the number of processing threads configured,
then everything will eventually go to hell. Here's how:
1. Many clients borrow connections from the dbcp, exhausting it
2. New clients requiring new borrowed connections /block/ waiting for
those pooled connections to be available
3. The requests blocked in #2 prevent new requests from being serviced
4. Clients who already "own" pooled connections cannot successfully
make requests that will ultimately re-populate your dbcp
So, unless you have maxActive == dbcp size, you're screwed.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAklAQUQACgkQ9CaO5/Lv0PAS5QCfV90jki6OkspGN3oIVaW1ZKMK
IgkAn0hL1tzOVUt2NrvBvU9GNUaUartv
=DIbX
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
|