Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Hibernate/JDBC/MySQL drop connections after a day or so?

Tags:

I have several server processes that once in a while respond to messages from the clients and perform read-only transactions.

After about a few days that the servers are running, they stop working correctly and when I check it turns out that there's a whole bunch of messages about the connection being closed.

When I checked it out, it turned out that hibernate by default works in some sort of development mode where connections are dropped after a few hours, and I started using c3po for connection pooling.

However, even with c3po, I get that problem about 24 hours or so after the servers are started.

Has anyone encountered that problem and knows how to address it? I'm not familiar enough with the intricacies of configuring hibernate.