From openindiana at out-side.nl Thu Oct 4 09:16:43 2018 From: openindiana at out-side.nl (the outsider) Date: Thu, 4 Oct 2018 15:16:43 +0200 Subject: [undertow-dev] Undertow.js and failed MySQL queries keep connection occupied? Message-ID: <01c501d45be4$7ec5cb70$7c516250$@out-side.nl> 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