scala - Play slick application - connection leak -


i using play-slick in play 2.1.3 application.
here code insert record

  def insert = dbaction { implicit rs =>     recordform.bindfromrequest.fold (         formwitherrors => {           redirect(homepage).flashing("alert-error" -> "enter proper values")         },         record => {           records.insert(record)           redirect(homepage).flashing("alert-success" -> "record inserted successfully")         }     )               } 

the above code leaking connection , application throws below error after 30+ requests

java.sql.sqlexception: timed out waiting free available connection.     @ com.jolbox.bonecp.bonecp.getconnection(bonecp.java:503) ~[bonecp.jar:0.7.1.release]     @ com.jolbox.bonecp.bonecpdatasource.getconnection(bonecpdatasource.java:114) ~[bonecp.jar:0.7.1.release]     @ scala.slick.session.playdatabase.createconnection(playdatabase.scala:9) ~[na:na]     @ scala.slick.session.basesession.conn$lzycompute(session.scala:207) ~[slick_2.10-1.0.1.jar:1.0.1]     @ scala.slick.session.basesession.conn(session.scala:207) ~[slick_2.10-1.0.1.jar:1.0.1]     @ scala.slick.session.session$class.preparestatement(session.scala:29) ~[slick_2.10-1.0.1.jar:1.0.1] 

similar issues reported, code different.
idea?

this instance of bug "2)" described in https://github.com/freekh/play-slick/issues/81 . fixed in play-slick master , in next release. buggy code in play-slick explained here play slick , async - race condition? . bug triggers follow-up bug in slick, instead of exception thrown, connection leaked: https://github.com/slick/slick/pull/107


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -