Oracle getConnection slow

不想你离开。 提交于 2019-11-29 04:34:29

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

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.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!