1

this is my first question on the site so be patient if something is not correctly in it.

I have a problem with Hibernate in the Grails application. The application works with MySQL database. When it tries to perform save operation for one specific domain object (this class is very simple, just several fields and many to one relation with another domain class) it hangs. I am getting socket timeout exception no matter how big max connection and max socket timeout was set during connection.

The strangest thing is that this happens only with production server. On local environment this piece of code works fine. And other database operations are also executed fine.

I tried to perform generated by Hibernate insert statement manually and it works good. But Hibernate still fails to finish the operation no matter how long I wait.

Do you have any ideas what can cause such behavior?

user2525437
  • 155
  • 4
  • What is the dialect you have used for production datasource? Can you show `DataSource.groovy` here? – dmahapatro Jun 26 '13 at 19:19
  • what are you seeing on mysql side (e.g. mysqladmin proc), how many conn open, how long are they running? – ikumen Jun 26 '13 at 19:27
  • Possible duplicate of this SO question: http://stackoverflow.com/questions/2740987/mysql-connection-timeout-issue-grails-application-on-tomcat-using-hibernate-an – rimero Jun 26 '13 at 20:56
  • I doubt that this issue is related to connectivity itself because everything else works fine. I configured connections pool (dbcp) to check connections before borrow them. It looks more like a deadlock that doesn't produce exceptions? Is this possible with MySQL and Hibernate? – user2525437 Jun 27 '13 at 12:58

0 Answers0