[undertow-dev] Undertow.js and failed MySQL queries keep connection occupied?
the outsider
openindiana at out-side.nl
Thu Oct 4 09:16:43 EDT 2018
We try to use undertow.js for database interactions and this works well as
long as the queries do not fail.
But in case something breaks, the JDBC connection seems to stall in wildfly
and can not be closed in any matter.
(There isn't even a connection.close() statement available in undertow.js ?
)
Function demo() {
var db = $undertow.resolve("config");
try{
var query = "select ID as maxID
from null"; // this will fail for sure
var dbresult =
db.selectOne(query);
// now undertow.js will jump to the catch() block
result.db = dbresult['maxID'];
return result;
}catch(ex){
print(ex.toString());
}
}
Every time we call the above function the JDBC driver will make a new
connection to the database and the old ones will remain connected and will
never be cleared.
This continues until the Max Pool Size: is reached.
Systems tested: Wildfly 10 /11 on Windows and Linux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20181004/f101684a/attachment.html
More information about the undertow-dev
mailing list