2

I see the following error in the log:

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed by the driver.

I have reduced the wait_timeout in my.cnf to 60 Should I set the default value for this parameter? I am told my Java Programmers that this may be one of the reasons.

1 Answer 1

1

I've had a same exception as yours, I think you did some operations after you closed the connection.For example:

{  

try{ Connecton conn = DriverManager.getConnection(...);

....

....

....

conn.close();

conn.commit();//Any operations on conn after conn.close() will throw //com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException

}catch(Exception e){

...

}finally{

...

}

}

The example shows how the exception come out.I think you did something like it does.

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

1 Comment

I will like to know if I should increase wait_timeout to default 28800 to be on safer side.

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.