Re: com.mysql.jdbc.exceptions.MySQLNonTransientConnectionExcep ti on: No operations allowed after connection closed
Posted by: Todd Farmer
Date: December 11, 2012 09:41AM

Hello Praveen,

Praveen Kumar Wrote:
-------------------------------------------------------
> Hi i am getting the following error sometimes.
> What does it mean?
>
> com.mysql.jdbc.exceptions.MySQLNonTransientConnect
> ionException: No operations allowed after
> connection closed.Connection was implicitly closed
> due to underlying exception/error:
...
> java.net.SocketException
> MESSAGE: Software caused connection abort: socket
> write error

It means that Java was unable to write to the network socket previously used for the connection to MySQL. The likely cause is that the Connection objects are left idle for an excessive period of time. If you are using connection pooling, make sure the connection is being validated while idle in the pool. Make sure you explicitly test Connection validity (some connection pools have testOnBorrow or equivalent properties to do this automatically) when a Connection is first allocated from the pool, or if you have long-running business processes that run while the Connection is allocated and idle. Make sure you don't have socketTimeout property set (or that, if it *is* set, you aren't leaving connections idle beyond that threshold).

Hope that helps,

--
Todd Farmer
MySQL @ Oracle
http://www.oracle.com/mysql/

Options: ReplyQuote


Subject
Written By
Posted
Re: com.mysql.jdbc.exceptions.MySQLNonTransientConnectionExcep ti on: No operations allowed after connection closed
December 11, 2012 09:41AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.