title: Google Cloud SQL - MySQL server has gone away
body: <p>I have a site remotely hosted away from the Google Cloud SQL instance. I have set up and authorised CIDR range for this. I am using PHP (PDO) to connect to the Google Cloud SQL instance with an application built on the Laravel 5 framework. The website itself is deployed on Windows Azure, I do not have a choice about this stack.</p>
  
  <p>My problem is on probably about 10% of page loads I receive the error:
  <code>SQLSTATE[HY000] [2006] MySQL server has gone away</code></p>
  
  <p>While trying to set up the CIDR for this in the developer console (getting my Azure IP and converting it to a range) I had this problem 100% of the time, so it's possible that it's related to IP authorisation, however why would this work 80-90% of the time, and deny the application sporadically?</p>
  
  <p>Any help would be much appreciated.</p>