users@glassfish.java.net

Re: Full connection pool? looks like getConnection hangs

From: <glassfish_at_javadesktop.org>
Date: Mon, 19 Apr 2010 07:11:39 PDT

We fiddled with other parameters and we think we found the cause: it is the "statement timeout".
If statement timeout is disabled, these hangs on getConnection do not happen. If it is enabled, they randomly happen. Connection validation (table-based) was enabled in both cases.
Case A: table-based validation + logintimeout + closeallconnections + NO statement timeout: getConnection never hangs
Case B: table-based validation + logintimeout + closeallconnections + statement timeout: getConnection randomly hangs.

Could printing out the thread state (with jstack) be useful in those cases? I suspect that enabling statement timeouts could produce some obscure deadlocks in our environment.

(LoginTimeout is low but our application is near-realtime and it can provide sensible default values in case the database is not working, so it needs to bail out as soon as possible)

We are using GlassFish Enterprise Server v2.1 Patch01 and the standard Oracle driver. I can't be more specific right now but I will check.

Thanks
[Message sent by forum member 'federicocozzi']

http://forums.java.net/jive/thread.jspa?messageID=397819