欢迎各位兄弟 发布技术文章
这里的技术是共享的
Notice in the following error log (upon logging in) how the initial error triggers itsself because of the error reporting, thus launching a recursive chain of error reporting.
Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (3, 'php', '%message in %file on line %line.', 'a:4:{s:6:"%error";s:12:"user warning";s:8:"%message";s:1918126:"MySQL server has gone away\nquery: UPDATE cache_menu SET data = 'a:2:{s:4:"tree";a:10:{i:1523;a:2:{s:4:"link";a:37:{s:14:"load_functions";N;s:16:"to_arg_functions";N;s:15:"access_callback";N;s:16:"access_arguments";N;s:13:"page_callback";N;s:14:"page_arguments";N;s:5:"title";N;s:14:"title_callback";N;s:15:"title_arguments";N;s:4:"type";N;s:11:"description";N;s:9:"menu_name\\ in D:\Apache Software Foundation\Apache2.2\htdocs\example\includes\database.mysql.inc on line 128
Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (3, 'php', '%message in %file on line %line.', 'a:4:{s:6:"%error";s:12:"user warning";s:8:"%message";s:259:"MySQL server has gone away\nquery: UPDATE cache_menu SET data = 'links:admin_menu:tree-data:3642f52f129986a97d03fcfb3a34fc45', created = 1225185684, expire = 0, headers = '', serialized = 0 WHERE cid = 'links:admin_menu:all-cid:0'";s:5:"%file";s:70:"D:\\Apache Software Foundation\\Apache2.2\\htdocs\\example\\includes\\cache.inc";s:5:"%line";i:109;}', 3, '', 'http://devel.example.com/example/node', 'http://devel.example.com/example/', '195.1xx.1xx.2xx', 1225185684) in D:\Apache Software Foundation\Apache2.2\htdocs\example\includes\database.mysql.inc on line 128
Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (3, 'php', '%message in %file on line %line.', 'a:4:{s:6:"%error";s:12:"user warning";s:8:"%message";s:119:"MySQL server has gone away\nquery: SELECT COUNT(sid) AS count FROM sessions WHERE timestamp >= 1225184784 AND uid = 0";s:5:"%file";s:72:"D:\\Apache Software Foundation\\Apache2.2\\htdocs\\example\\includes\\session.inc";s:5:"%line";i:119;}', 3, '', 'http://devel.example.com/example/node', 'http://devel.example.com/example/', '195.1xx.1xx.2xx', 1225185684) in D:\Apache Software Foundation\Apache2.2\htdocs\example\includes\database.mysql.inc on line 128
Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (3, 'php', '%message in %file on line %line.', 'a:4:{s:6:"%error";s:12:"user warning";s:8:"%message";s:122:"MySQL server has gone away\nquery: SELECT COUNT(DISTINCT uid) FROM sessions WHERE uid > 0 AND timestamp >= 1225184784";s:5:"%file";s:95:"D:\\Apache Software Foundation\\Apache2.2\\htdocs\\example\\modules\\acquia\\admin_menu\\admin_menu.module";s:5:"%line";i:281;}', 3, '', 'http://devel.example.com/example/node', 'http://devel.example.com/example/', '195.1xx.1xx.2xx', 1225185684) in D:\Apache Software Foundation\Apache2.2\htdocs\example\includes\database.mysql.inc on line 128
Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (3, 'php', '%message in %file on line %line.', 'a:4:{s:6:"%error";s:12:"user warning";s:8:"%message";s:1401:"MySQL server has gone away\nquery: UPDATE variable SET value = 'a:7:{s:9:"timestamp";i:1225185685;s:6:"active";s:1:"1";s:4:"href";s:36:"http://acquia.com/network/node/26503";s:15:"expiration_date";a:3:{s:5:"value";s:19:"2009-10-16T00:00:00";s:4:"view";s:51:"<span class="date-display-single">10/16/2009</span>";s:10:"time_to_go";s:20:"50 weeks 2 days left";}s:7:\ in D:\Apache Software Foundation\Apache2.2\htdocs\example\includes\database.mysql.inc on line 128
Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (3, 'php', '%message in %file on line %line.', 'a:4:{s:6:"%error";s:12:"user warning";s:8:"%message";s:85:"MySQL server has gone away\nquery: DELETE FROM cache WHERE cid = 'variables'";s:5:"%file";s:70:"D:\\Apache Software Foundation\\Apache2.2\\htdocs\\example\\includes\\cache.inc";s:5:"%line";i:179;}', 3, '', 'http://devel.example.com/example/node', 'http://devel.example.com/example/', '195.1xx.1xx.2xx', 1225185685) in D:\Apache Software Foundation\Apache2.2\htdocs\example\includes\database.mysql.inc on line 128
Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (3, 'php', '%message in %file on line %line.', 'a:4:{s:6:"%error";s:12:"user warning";s:8:"%message";s:145:"MySQL server has gone away\nquery: SELECT f.name, f.type, v.value FROM profile_fields f INNER JOIN profile_values v ON f.fid = v.fid WHERE uid = 3";s:5:"%file";s:82:"D:\\Apache Software Foundation\\Apache2.2\\htdocs\\example\\modules\\profile\\profile.module";s:5:"%line";i:229;}', 3, '', 'http://devel.example.com/example/node', 'http://devel.example.com/example/', '195.1xx.1xx.2xx', 1225185685) in D:\Apache Software Foundation\Apache2.2\htdocs\example\includes\database.mysql.inc on line 128
Status: | Active | » Closed (won't fix) |
It usually means that your MySQL has run out of resources. See http://drupal.org/node/259580 and http://dev.mysql.com/doc/refman/5.0/en/gone-away.html for how to fix the problem.
Duplicates:
#514606: MySQL server has gone on UPDATE cache_menu
#120845: Mysql error
#441844: MySQL errors on OG Views Install
http://drupal.org/node/460054#comment-1581826
http://drupal.org/node/203326#comment-754927
http://drupal.org/node/340565
Some other solutions:
- http://drupal.org/node/85768
- http://dev.mysql.com/doc/refman/5.1/en/packet-too-large.html
- try to install db_tweaks module if your provider allow you to change mysql session variables
- http://www.philadelphia-reflections.com/blog/1503.htm
See also:
http://drupal.org/requirements
Or:
http://drupal.org/hosting
In my opinion it should be optimized somehow.
Look:
http://drupal.org/files/issues/Clipboard02_14.jpg
It looks like some mess, than normal serialized variable.
Those & and " are really necessary?
I added this code to my db module in the query routine that contained the line on which the error_file shows the recursion://database.mysql.inc 136行左右
加上下面的代码
// Do not attempt to store an error in the DB that says "MySQL has gone away"
if(preg_match("/MySQL server has gone away/",check_plain(mysql_error($active_db))
))
{
if ($debug) {
print '<p>Not attempting to store in DB: '. $query .'<br />'.'</p>';
}
return TRUE;
}
来自 https://drupal.org/node/327066
I get a bunch of these too, once and awhile, not sure why