3

This just happened, but just one time. Any idea why?

CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 2013 Lost connection to MySQL server during query. The SQL statement executed was: SELECT id, groupId, name, handle, context, instructions, translatable, type, settings FROM craft_fields WHERE context = :context ORDER BY name. Bound with :context='global' (/Users/johndoe/Desktop/Projects/websitetest/craft/app/framework/db/CDbCommand.php:543)

0 /Users/johndoe/Desktop/Projects/websitetest/craft/app/framework/db/CDbCommand.php(396): CDbCommand->queryInternal('fetchAll', Array, Array)

... (large, not relevant stack trace)

30 {main}

3

CDbException is the exception that Yii will throw when something has gone wrong with a database operation.

Here's the only important part of the error message:

SQLSTATE[HY000]: General error: 2013 Lost connection to MySQL server during query.

Unfortunately that error can occur for any one of 3,210 different reasons including network connection errors, misconfigured PDO, MySQL and/or PHP, etc. It's going to be difficult to track down especially if it's only occurring sporadically.

2

Looks like it is failing in local development on a Mac. My experience with native MySQL on OS X 10.9.3 is that the MySQL server just stops working once every few weeks, and I have to restart it. Since it's only occasional and I don't use it for anything really critical, I just live with the restarts.

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.