You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Darren Kukulka <Da...@connaught.plc.uk> on 2008/10/22 17:25:36 UTC

Blocked threads

Hi,

 

We've got a Tomcat 6.0.13 server running a single application under
64-bit windows with 64-bit SUN JDK 1.6_03

 

It runs into situations where a large number of blocked threads appear
that seem to relate to hibernate functions unable to obtain database
connections/resources.  This leads to the application slowing down
considerably to the point where we need to restart Tomcat to restore
service.

 

At the moment we are having a performance review of the back-end
database which runs separately on a SQL Server 2005 server.  We thought
it would be prudent to see if there is any tuning we could do within
Tomcat to help alleviate the pain felt by the users.

 

Is anybody aware of any parameters that can be utilised, either
programmatically or through Tomcat configuration?

 

Thanks in advance!

 

Darren Kukulka

 


Re: Blocked threads

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark,

Mark Thomas wrote:

> Sounds like you have a connection leak. There are various techniques for
> tracking these down. One I like is setting the connection pool size to 1 in
> your dev environment and then running your tests.

+1

I always use a fixed connection pool size of 1 for all development and
testing (except load testing, of course). This allows us to catch some
potential connection leaks as well as double-checkouts (which is more
often a problem for us than connection leaks). We also turn on
"abandoned" checking and logging even in production to detect abandoned
pooled connections. This results in a stack trace for the code that
checked-out the connection but never returned it to the pool (after a
timeout, though).

See the Tomcat JDBC docs for more info on these debugging settings.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkAuFcACgkQ9CaO5/Lv0PBPpgCbBjT/x6bOY0nx2lGKXABu3+dn
C1cAoJl4n/1zyP4UkWpUObPVaOrnOufx
=grBV
-----END PGP SIGNATURE-----

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


Re: Blocked threads

Posted by Mark Thomas <ma...@apache.org>.
Darren Kukulka wrote:
> Hi,
> 
>  
> 
> We've got a Tomcat 6.0.13 server running a single application under
> 64-bit windows with 64-bit SUN JDK 1.6_03
> 
>  
> 
> It runs into situations where a large number of blocked threads appear
> that seem to relate to hibernate functions unable to obtain database
> connections/resources.  This leads to the application slowing down
> considerably to the point where we need to restart Tomcat to restore
> service.
> 
>  
> 
> At the moment we are having a performance review of the back-end
> database which runs separately on a SQL Server 2005 server.  We thought
> it would be prudent to see if there is any tuning we could do within
> Tomcat to help alleviate the pain felt by the users.
> 
>  
> 
> Is anybody aware of any parameters that can be utilised, either
> programmatically or through Tomcat configuration?

Sounds like you have a connection leak. There are various techniques for
tracking these down. One I like is setting the connection pool size to 1 in
your dev environment and then running your tests.

Mark



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