title: MySQL server has gone away
body: <p>I've been working on a data query that will select a record from a table using the parameters given.</p>
  
  <p>It's been working perfectly when it is used in localhost but it throws an error when uploaded and used in production site. </p>
  
  <p>Please look at the error</p>
  
  <pre><code>exception 'CDbException' with message 'CDbCommand failed to execute the SQL
  statement: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away.
  The SQL statement executed was: SELECT id from MST_PERSON WHERE last_name =
  'name' and first_name = 'name'  and middle_name = 'name'  and
  birth_date = 'date' limit 1 '
  </code></pre>
  
  <p>I have tried increasing the wait_timeout of sql but no luck. </p>
  
  <p>Thanks in advance.</p>