<p>It looks like you might have the <a href="https://craftpl.us/plugins/smart-map/" rel="nofollow">Smart Maps</a> 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 <a href="https://craftpl.us/plugins/smart-map/change-log" rel="nofollow">resolved</a>.</p>

CC BY-SA 3.0
2014-12-26T21:32:16.920Z
Does this require me to purchase the new version? Or can I upgrade the legacy version?
Brett DeWoody
CC BY-SA 3.0
2014-12-26T21:39:19.123Z
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
CC BY-SA 3.0
2014-12-26T21:44:06.210Z
Great, thanks for the help. Marking this as solved.
Brett DeWoody
CC BY-SA 3.0
2014-12-26T22:52:14.197Z
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](https://craftpl.us/plugins/smart-map).
Lindsey D
CC BY-SA 3.0
2014-12-26T21:22:09.557Z
2014-12-26T21:22:09.557Z
Brad Bell
<p>Several visitors, over the course of weeks, have mentioned receiving the following error when viewing the site:</p>

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

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

<p>Has anyone seen this error? </p>

<p>Any insight as to what's going on here is appreciated. </p>

<pre><code>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-&gt;queryInternal('fetch', Array, Array)
#1 /nfs/c06/h06/mnt/187742/domains/obozfootwear.com/craft/app/services/ElementsService.php(147): CDbCommand-&gt;queryRow()
#2 /nfs/c06/h06/mnt/187742/domains/obozfootwear.com/craft/app/etc/web/UrlManager.php(278): Craft\ElementsService-&gt;getElementByUri('', 'en_us', true)
#3 /nfs/c06/h06/mnt/187742/domains/obozfootwear.com/craft/app/etc/web/UrlManager.php(137): Craft\UrlManager-&gt;_getMatchedElementRoute('')
#4 /nfs/c06/h06/mnt/187742/domains/obozfootwear.com/craft/app/framework/web/CWebApplication.php(140): Craft\UrlManager-&gt;parseUrl(Object(Craft\HttpRequestService))
#5 /nfs/c06/h06/mnt/187742/domains/obozfootwear.com/craft/app/etc/web/WebApp.php(264): CWebApplication-&gt;processRequest()
#6 /nfs/c06/h06/mnt/187742/domains/obozfootwear.com/craft/app/framework/base/CApplication.php(180): Craft\WebApp-&gt;processRequest()
#7 /nfs/c06/h06/mnt/187742/domains/obozfootwear.com/craft/app/index.php(62): CApplication-&gt;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&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;ved=0CCAQFjAA&amp;url=http%3A%2F%2Fobozfootwear.com%2F&amp;ei=8MWaVKfVBtGE8gWz-oKIBg&amp;usg=AFQjCNGF_NGGtGdApatcXOoA3BYgIYOnZg&amp;sig2=mmDpzpWjXopxNLsBnUTj6g&amp;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`.
</code></pre>

<error-message>
Error: 2006 MySQL server has gone away
# Error: 2006 MySQL server has gone away

(Asked by: username_0 on 2014-12-26)

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`.

**Tags:** error-message

---

## 1 answers

### Answer by username_1 on 2014-12-26. Score: 2 | Accepted answer

It looks like you might have the [Smart Maps](https://craftpl.us/plugins/smart-map/) 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](https://craftpl.us/plugins/smart-map/change-log).

> **Comments:**
> **username_0**: Does this require me to purchase the new version? Or can I upgrade the legacy version?  
> **username_1**: 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.  
> **username_0**: Great, thanks for the help. Marking this as solved.  
> **username_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](https://craftpl.us/plugins/smart-map).  

---

