Pool Error Object Timeout (Java JDBC)

I recently upgraded my MySQL server to MariaDB, since then I am having trouble with several errors.

After a while, my application will crash and the following errors will appear:

java.util.NoSuchElementException: Timeout waiting for idle object



Cannot get a connection, pool error Timeout waiting for idle object


Or NullPointerExceptions on executeUpdate () in prepared language!

My code for connecting to the database:

public static void connect() {
    try {
        connection = DriverManager.getConnection("jdbc:mysql://"
                + Data.MySQL_host + ":3306/" + Data.MySQL_db,
                Data.MySQL_user, Data.MySQL_pass);
        System.out.println("MySQL connected!");
    } catch (SQLException e) {
        System.out.println("Error connecting to MySQL");


Do I need to modify my MariaDB server or link it to my application?


source to share

1 answer

there is something wrong with your configuration, so you cannot get a simple object to connect. Configure first!



All Articles