Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8952963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:59:25+00:00 2026-06-15T13:59:25+00:00

I have been using Play 2.0.2 in order to create a Java application. For

  • 0

I have been using Play 2.0.2 in order to create a Java application. For a few days I’m running into a problem. After ~100 request the server starts to throw this exception:

[[SQLException: Timed out waiting for a free available connection.]]

I create a new instance of Connection with DB.getConnection(). I don’t close the Connection instances because there’s only one instance of each request and as far as I know it automatically closes Connection instances when the active TCP connection is closed.
I tried to increase db.default.connectionTimeout value to 100 seconds but it couldn’t fix the problem. Then I checked active Postgresql connections and there was no active connection. Also I restarted Postgresql but it also couldn’t fix the problem.

The only solution for this problem for now is killing the Play20 instance and starting a new one.

Here is the log Play2.0 created:

! @6cg9il6ki - Internal server error, for request [GET [AN URL]] ->

play.core.ActionInvoker$$anonfun$receive$1$$anon$1: Execution exception [[SQLException: Timed out waiting for a free available connection.]]
        at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:134) [play_2.9.1.jar:2.0.2]
        at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:115) [play_2.9.1.jar:2.0.2]
        at akka.actor.Actor$class.apply(Actor.scala:318) [akka-actor.jar:2.0.2]
        at play.core.ActionInvoker.apply(Invoker.scala:113) [play_2.9.1.jar:2.0.2]
        at akka.actor.ActorCell.invoke(ActorCell.scala:626) [akka-actor.jar:2.0.2]
        at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:197) [akka-actor.jar:2.0.2]
Caused by: java.sql.SQLException: Timed out waiting for a free available connection.
        at com.jolbox.bonecp.BoneCP.getConnection(BoneCP.java:503) ~[bonecp.jar:0.7.1.RELEASE]
        at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:114) ~[bonecp.jar:0.7.1.RELEASE]
        at play.api.db.DBApi$class.getConnection(DB.scala:64) ~[play_2.9.1.jar:2.0.2]
        at play.api.db.BoneCPApi.getConnection(DB.scala:273) ~[play_2.9.1.jar:2.0.2]
        at play.api.db.DB$$anonfun$getConnection$1.apply(DB.scala:129) ~[play_2.9.1.jar:2.0.2]
        at play.api.db.DB$$anonfun$getConnection$1.apply(DB.scala:129) ~[play_2.9.1.jar:2.0.2]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:59:26+00:00Added an answer on June 15, 2026 at 1:59 pm

    You mention that:

    I don’t close the Connection instances because there’s only one
    instance of each request

    That’s wrong, you have to close it otherwise you end up with the issue you see.

    The reason is that you are getting a direct JDBC connection, not one managed by the ORM (EBeans or some other JPA-compliant) so if you don’t close it the connection may be dangling for a while.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to do this for a few days now using AVFoundation
I have been using play 1.2.5rc4 for development of one app and I have
I have been using some Javascript to create a text field once an certain
I have been using the storyboard to make an application and currently there are
I've recently started using the Play! framework (v2.0.4) for writing a Java web application.
I have been using a class to play sounds using AVAudioPlayer. Since I want
I have been trying to get this trigger created using Play 2.0.3. It runs
I have been developing a web app using play framework for a while (using
I've been using Play 2.0 framework for a couple of days now for a
So I have been working on a few projects using audio and images from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.