Craft CMS Asked by osh on March 7, 2021
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
FROMcraft_fields
WHERE context = :context ORDER BYname
. 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}
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.
Answered by Marion Newlevant on March 7, 2021
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.
Answered by Brad Bell on March 7, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP