title: Hibernate timeout when saving
body: <p>I have an app that uses MySql to save into a table (This table has 2 JSON fields and one of the can receive a large input). Every now and then in production I'm having the getting the following error: </p>
  
  <blockquote>
    <p>SqlExceptionHelper - The last packet successfully received from the server was 71,290,382 milliseconds ago.<br>
    The last packet sent successfully to the server was 71,290,384 milliseconds ago. is longer than the server 
    configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity 
    before use in your application, increasing the server configured values for client timeouts, or using the Connector/J 
    connection property 'autoReconnect=true' to avoid this problem.</p>
  </blockquote>
  
  <p>I'm not understanding why this happens, since localy I never faced this issue. This is the configuration I currently have:</p>
  
  <pre><code>cfg.setProperty("hibernate.c3p0.min_size", "5")
                  .setProperty("hibernate.c3p0.max_size", "20")
                  .setProperty("hibernate.c3p0.timeout", "30000")
                  .setProperty("hibernate.c3p0.max_statements", "50")
                  .setProperty("hibernate.c3p0.idle_test_period", "3000")
                  .setProperty("hibernate.connection.autoReconnect", "true")
                  .setProperty("hibernate.connection.autoReconnectForPools", "true");
  </code></pre>
  
  <p>Am I missing something?.</p>