2

Several visitors, over the course of weeks, have mentioned receiving the following error when viewing the site:

CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

The log file shows the error (below). Not just once, but multiple times within a short time span.

Has anyone seen this error?

Any insight as to what's going on here is appreciated.

2014/12/24 13:57:46 [warning] [application] The request to freegeoip.net failed: Server error response
[status code] 502
[reason phrase] Bad Gateway
[url] http://freegeoip.net/json/182.171.233.223
2014/12/24 13:57:46 [error] [system.db.CDbCommand] CDbCommand::fetch() failed: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away. The SQL statement executed was: SELECT  'elements'.'id', 'elements'.'type'
FROM 'craft_elements' 'elements'
JOIN 'craft_elements_i18n' 'elements_i18n' ON elements_i18n.elementId = elements.id
WHERE (elements_i18n.uri = :uri) AND (elements_i18n.locale = :locale) AND (elements_i18n.enabled = 1) AND (elements.enabled = 1) AND (elements.archived = 0).
2014/12/24 13:57:46 [error] [exception.CDbException] exception 'CDbException' with message 'CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /nfs/c06/h06/mnt/187742/domains/obozfootwear.com/craft/app/framework/db/CDbCommand.php:543
Stack trace:

#0 /nfs/c06/h06/mnt/187742/domains/obozfootwear.com/craft/app/framework/db/CDbCommand.php(415): CDbCommand->queryInternal('fetch', Array, Array)
#1 /nfs/c06/h06/mnt/187742/domains/obozfootwear.com/craft/app/services/ElementsService.php(147): CDbCommand->queryRow()
#2 /nfs/c06/h06/mnt/187742/domains/obozfootwear.com/craft/app/etc/web/UrlManager.php(278): Craft\ElementsService->getElementByUri('', 'en_us', true)
#3 /nfs/c06/h06/mnt/187742/domains/obozfootwear.com/craft/app/etc/web/UrlManager.php(137): Craft\UrlManager->_getMatchedElementRoute('')
#4 /nfs/c06/h06/mnt/187742/domains/obozfootwear.com/craft/app/framework/web/CWebApplication.php(140): Craft\UrlManager->parseUrl(Object(Craft\HttpRequestService))
#5 /nfs/c06/h06/mnt/187742/domains/obozfootwear.com/craft/app/etc/web/WebApp.php(264): CWebApplication->processRequest()
#6 /nfs/c06/h06/mnt/187742/domains/obozfootwear.com/craft/app/framework/base/CApplication.php(180): Craft\WebApp->processRequest()
#7 /nfs/c06/h06/mnt/187742/domains/obozfootwear.com/craft/app/index.php(62): CApplication->run()
#8 /nfs/c06/h06/mnt/187742/domains/obozfootwear.com/html/index.php(14): require_once('/nfs/c06/h06/mn...')
#9 {main} 

REQUEST_URI=/HTTP_REFERER=http://www.google.co.jp/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCAQFjAA&url=http%3A%2F%2Fobozfootwear.com%2F&ei=8MWaVKfVBtGE8gWz-oKIBg&usg=AFQjCNGF_NGGtGdApatcXOoA3BYgIYOnZg&sig2=mmDpzpWjXopxNLsBnUTj6g&bvm=bv.82001339,d.dGc

2014/12/24 13:57:46 [error] [application] CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
2014/12/24 13:57:46 [error] [system.db.CDbCommand] CDbCommand::fetchAll() failed: 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 context = :context
ORDER BY `name`.
2

It looks like you might have the Smart Maps plugin installed. There was a bug with earlier versions of it that had a similar error message. Update to the latest version and it should be resolved.

| improve this answer | |
  • Does this require me to purchase the new version? Or can I upgrade the legacy version? – Brett DeWoody Dec 26 '14 at 21:32
  • No idea... I don't recall if v1 was free, then v2 went commercial, or it's always been commercial. Best to contact the author. – Brad Bell Dec 26 '14 at 21:39
  • Great, thanks for the help. Marking this as solved. – Brett DeWoody Dec 26 '14 at 21:44
  • 2
    Hey @Brett, seeing this thread... Yes, Smart Map has officially fixed all issues related to the FreeGeoIp.net service. And as of v2.0.10, all geolocation is off by default. While Smart Map v1.x was free on Github, the much improved 2.x version is available on Craft Plus. – Lindsey D Dec 26 '14 at 22:52

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.