0

I manage my connections by JDBC connection pool (BoneCP) and I always close the connection, the preparedStatement und the ResultSet.

But, when my programm is running for several days, the mysql-server gets slower and slower (for testing, I let my programm insert an entry every second). After 2 days, there were several seconds between the entries and that is why I think that the mysql server is getting slower and can handle the incomming transaction. Am I right?

The mysql server also uses much more of RAM and does not release the resources. So does anyone know, how I could find the error causing this behaviour? Thanks in advice!

1 Answer 1

2

Use the MySQL Workbench to detect open connections. It also gives you a host of options to see performance of your database server.

Also [I might be mistaken about this part of your question], when you say

I use connection pooling

why do you close the connection? Isn't that the opposite of the purpose of connection pooling?

Sign up to request clarification or add additional context in comments.

1 Comment

You don't really close the connection, when you use a connection pool - the function close() gets a whole new meaning, where the connection is not physically closed, but just released for further use. Thanks for suggesting to use workbench - I will try to debug with this tool :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.