title: Spring Boot JPA - configuring auto reconnect
body: <p>I have a nice little Spring Boot JPA web application. It is deployed on Amazon Beanstalk and uses an Amazon RDS for persisting data. It is however not used that often and therefore fails after a while with this kind of exception:</p>
  
  <blockquote>
    <p>com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 79,870,633 milliseconds ago.<br>
        The last packet sent successfully to the server was 79,870,634 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 am not sure how to configure this setting and can not find information on it on <a href="http://spring.io" rel="noreferrer">http://spring.io</a> (a very good site though). What are some ideas or pointers to information?</p>