Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

drupal views module mysql error

i have enabled the view module and get this when i go to structure>views in drupal 7

Additional uncaught exception thrown while handling exception. Original

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: DELETE FROM {cache_form} WHERE (cid = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => form_form-MKcd7j8VJkLHaG7-JGW-vREo_XeUngdnLcqlKOn-02o ) in cache_clear_all() (line 170 of /home/tennis/public_html/includes/cache.inc). Additional

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => php [:db_insert_placeholder_2] => %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] => a:6:{s:5:"%type";s:12:"PDOException";s:8:"!message";s:240:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: DELETE FROM {cache_form} WHERE (cid = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => form_form-MKcd7j8VJkLHaG7-JGW-vREo_XeUngdnLcqlKOn-02o ) ";s:9:"%function";s:17:"cache_clear_all()";s:5:"%file";s:43:"/home/tennis/public_html/includes/cache.inc";s:5:"%line";i:170;s:14:"severity_level";i:3;} [:db_insert_placeholder_4] => 3 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => http://192.168.1.66/~tennis/admin/structure/views [:db_insert_placeholder_7] => http://192.168.1.66/~tennis/user/1 [:db_insert_placeholder_8] => 192.168.1.172 [:db_insert_placeholder_9] => 1309366098 ) in dblog_watchdog() (line 155 of /home/tennis/public_html/modules/dblog/dblog.module).

what maybe my issue?

like image 770
chan Avatar asked Jun 29 '11 16:06

chan


1 Answers

Here is some information on that error: http://dev.mysql.com/doc/refman/5.1/en/gone-away.html and a similar issue on Drupal.org: http://drupal.org/node/984112

Another helpful post regarding this error: http://madhavvyas.blogspot.com/

It seems that the problem lies with max_allowed_packet in the configuration for MySQL.

From the Drupal issue, another user provides some steps that may assist you (this user is using XAMPP but steps are similar):

How to fix this problem

  • Go to xampp\mysql\bin
  • Open my.ini
  • Change "max_allowed_packet" from "1m" to "16m" (or larger)
  • Save my.ini Now restart MySql through the XAMPP control panel.
like image 75
Laxman13 Avatar answered Sep 24 '22 15:09

Laxman13