AnswerBun.com

CDbException: What does this mean?

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 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}

2 Answers

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

Add your own answers!

Related Questions

Strange 404 Errors

1  Asked on May 27, 2021

 

Contact Form – Missing submissions

1  Asked on May 27, 2021 by springboynick

   

Duplicate content from www and non-www

2  Asked on May 27, 2021 by alex-carpenter

 

Seomatic – show only global site title

2  Asked on May 24, 2021 by filip-bartnicki

 

PHP Login & Sessions without Craft Commerce?

1  Asked on May 23, 2021 by jtr

     

Prevent caching from inside of the cache tag

2  Asked on May 23, 2021 by matthias-redl-mann

 

Redirect after password reset

0  Asked on May 22, 2021

   

Filter locations by country in Smart Map

2  Asked on May 21, 2021 by tom-de-smet

   

Where does Craft store HTML Templates?

1  Asked on May 18, 2021 by jordan-rennick

       

Invalid path alias: @ error

1  Asked on May 17, 2021 by tim-print

 

Form field as ‘Upload Location Subfolder’

0  Asked on May 15, 2021 by john-dunkel

         

Store Hours field in Matrix

0  Asked on May 15, 2021 by fodney

 

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir