I get an error when trying to load a page occasionally. It appears to have a problem getting the "type" property from a matrix block.

CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]:
General error: 2006 MySQL server has gone away. The SQL statement 
executed was: SELECT `id`, `groupId`, `name`, `handle`, `context`, 
`instructions`, `translatable`, `type`, `settings`
FROM `craft_fields`
WHERE (handle = :handle) AND (context = :context)
ORDER BY `name`. Bound with :handle='type',
  • 2
    "MySQL server has gone away" – it looks like you're having connection problems.
    – carlcs
    Oct 14 '15 at 6:19

A 2006: MySQL server has gone away error generally means that (for any number of reasons) the connection between Craft/PHP and the MySQL server has been dropped.

Common causes are from connection timeouts and misconfigured MySQL settings like max_packet_size.

There are lots of debugging tips in the above link from MySQL's official documentation that would be a good place to start. Additionally you might want to involve your host and let them know what you're seeing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.