tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Unable to sendViaPost to url...... .... java.net.SocketTimeoutException: Read timed out
Date Fri, 20 Jan 2012 15:15:22 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bert,

On 1/18/12 4:22 PM, Bert Verhees wrote:
> I have done my testing, and at this moment, it seems that I found
> the problem, I forgot to close a databaseconnection in a function
> which is called a zillion times. Just one line of code, and the
> problem was solved.

Consider doing the following:

In your development environment, set maxActive in your connection pool
to "1". Also set the "logAbandoned" and similar settings to catch
resources that you don't properly close.

With maxActive="1", your webapp will stop dead for several minutes
while the connection pool starves waiting for the one missing
connection to (never) be returned to the pool before killing it and
creating a new one. Trust me: you'll notice when that happens.

We have the logAbandoned stuff even set in production just in case we
don't notice something in development.

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

iEYEARECAAYFAk8ZhQoACgkQ9CaO5/Lv0PAd9ACfXiOQju6eLIMpB14bZhbkip/B
WjoAoJYJLf+vpYqh3IGYumI7zizO6Ggp
=cCmq
-----END PGP SIGNATURE-----

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


Mime
View raw message