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 4267844
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T06:57:17+00:00 2026-05-21T06:57:17+00:00

In a Java project, I am using an ojdbc6 jar <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>11.2.0.1.0</version>

  • 0

In a Java project, I am using an ojdbc6 jar

    <dependency>
        <groupId>com.oracle</groupId>
        <artifactId>ojdbc6</artifactId>
        <version>11.2.0.1.0</version>
        <scope>compile</scope>
    </dependenc>

The first time for a day I run, dataSource.getConnection() is fast. Second time is usually okay. The next few times take around 45 seconds. After that, it takes multiple minutes. Once I have the FIRST connection of a given application run, any new connections I get are very very fast. This delay is only getting the FIRST connection for a given run.

What is making getting my first connection so slow?

I am watching netstat and don’t see any connection hanging after a successful run. Have tried several different connection pools (DBCP, C3PO) with no luck. Debugging through source code, the delay is 100% on the line of org.springframework.jdbc.datasource.DataSourceUtils:

Connection con = dataSource.getConnection();

Any ideas?

Edited For More Details

1) I am using a connection pool (DBCP or C3PO) which saves connections for future use. When I talk about getting a new connection, I mean while the first connection is in use.. I need to go to the DB and get a NEW connection. Of course I can return and get my same connection from the connection pool over and over again. But getting a second at the same time is also fast.

2) I do not know how many connections my DB lets me be logged in with. Any idea where this property is in oracle?

  • 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-05-21T06:57:17+00:00Added an answer on May 21, 2026 at 6:57 am

    Was due to java using /dev/random instead of /dev/urandom to make a ssh connection with the database…. switching to /dev/urandom fixed this

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

Sidebar

Related Questions

I am working on a Java project using Netbeans for the first time. I
I try to compile a ( LWJGL ) Java project using NetBeans . I
Almost every new Java-web-project is using a modern MVC-framework such as Struts or Spring
I'm using Jython to write tests for a Java project. It works well, but
At present I am using eclipse for JAVA project. I always wanted to use
When using Eclipse or NetBeans IDE on a Java project I get to see
I recently got involved in a Java project at work: we're using MyEclipse for
For a new Java web project I thought about using: Eclipse as IDE Mercurial
I am using hudson CI to manage a straight java web project, using ant
I am considering using Maven for a Java open source project I manage. In

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.