Oracle getConnection slow

前端 未结 3 1291
北恋
北恋 2020-12-16 22:45

In a Java project, I am using an ojdbc6 jar

    
        com.oracle
        ojdbc6

        
相关标签:
3条回答
  • 2020-12-16 22:59

    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 讨论(0)
  • 2020-12-16 23:02

    2 questions.

    First, after you get the first connection, what are you doing with it? Are you closing it correctly (INCLUDING all resources you opened with it, like Statement and ResultSet)?

    Second, how many connections does your DB allow you for the credentials you logged in with?

    The reason I ask these questions is that the time delays may be the amount of time it takes for the DB to clean up after you (because you may not have done it right) and free up a connection to give you. Much of this could just be timeouts before it forcefully releases resources.

    0 讨论(0)
  • 2020-12-16 23:23

    Are you exceeding your max active connections in your connection pool and have to wait for your program to release old connections?

    0 讨论(0)
提交回复
热议问题