Hello
When editing any links menu in the demo store error:
PDOException: SQLSTATE [HY000]: General error: 2006 MySQL server has gone away: SELECT s.lid, t.translation, s.version FROM {locales_source} s LEFT JOIN {locales_target} t ON s.lid = t.lid AND t . language =: language WHERE s.source =: source AND s.context =: context AND s.textgroup = 'default'; Array ([: language] => ru [: source] => Add a customer profile [ : context] =>) in locale () (line 684 of / var / www / vhosts / httpdocs / modules / locale / locale.module).
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] => General error: 2006 MySQL server has gone away: SELECT s.lid, t.translation, s.version FROM {locales_source} s LEFT JOIN {locales_target} t ON s.lid = t.lid AND t.language =: language WHERE s . source =: source AND s.context =: context AND s.textgroup = ' default '; Array ([: language] = > ru [: source] = > Add a customer profile [: context] = >) [: Db_insert_placeholder_4] => 3 [: db_insert_placeholder_5] => [: db_insert_placeholder_6] => http://admin/structure/menu/item/778/edit [: db_insert_placeholder_7] => http:/// [ : db_insert_placeholder_8] => 46.229.191.142 [: db_insert_placeholder_9] => 1348557110) in dblog_watchdog () (line 154 of / var / www / vhosts / httpdocs / modules / dblog / dblog.module).
Setup mysql:
[Mysqld]
local-infile = 0
datadir = / var / lib / mysql
socket = / var / lib / mysql / mysql.sock
user = mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links = 0
[Mysqld_safe]
log-error = / var / log / mysqld.log
pid-file = / var / run / mysqld / mysqld.pid
innodb_rollback_on_timeout = 1
innodb_lock_wait_timeout = 600
max_connections = 350
log-bin = mysql-bin
binlog-format = 'ROW'
max_allowed_packet = 256M
OS Centos 6, Plesk Panel 11
Comments
Comment #1
theo_ CreditAttribution: theo_ commentedTry to add following line under [Mysqld] section :
max_allowed_packet=100M
Comment #2
Nikulcov CreditAttribution: Nikulcov commentedHere I am a fool)))
Not in that section added, thanks worked!
Thank you!
Comment #3
theo_ CreditAttribution: theo_ commentedLeave it as fixed since it can help other people ;)
Comment #5
makokis CreditAttribution: makokis commentedin wich file have to add this? in what directory is this file?
Sorry i am newbie.
many thanks
MAMP Pro
MySQL 5.5.25
phpMyAdmin 5.4.4
PHP 5.4.4
Comment #6
makokis CreditAttribution: makokis commentedTo implement the fix on your install do the following to the file:
/Applications/MAMP/Library/bin/mysqld_safe
edit the file "mysqld_safe"
open it and add at the end of the line 735 (aprox 730-740)
for i in "$ledir/$MYSQLD" "$defaults" "--basedir=$MY_BASEDIR_VERSION" \
"--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION" "--max_allowed_packet=268435456"
do
add at the end "--max_allowed_packet=268435456"
stop and restart mysql.
works for me !
Comment #7
makokis CreditAttribution: makokis commentedthanks theo_, it works!
Comment #8
stuzog CreditAttribution: stuzog commentedThanks! That worked in an OS X MAMP setup. Also added max_allowed_packet=128M to Resource Limits section of the php.ini(s) in MAMP.
Comment #9
jasonglisson CreditAttribution: jasonglisson commentedThis was the only solution that worked for me. I tried everything else that I could find. Thank you for you're suggestion!
Comment #10
Horroshow CreditAttribution: Horroshow commentedIf you're using AMPPS none of the solution will work until you quit and restart AMPPS.
It's working for me now, thanks!
Comment #11
CD CreditAttribution: CD commentedHi,
I have the latest version of MAMP Version 2.2 (2.2) running PHP 5.5.3.
I have the same problem after trying to add new product type in drupal 7 commerce:
Additional uncaught exception thrown while handling exception.
Original
PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT COUNT(cid) FROM {comment} WHERE status = :status; Array ( [:status] => 0 ) in comment_count_unpublished() (line 314 of /Applications/MAMP/htdocs/new-site/modules/comment/comment.module).
I went to the "mysqld_safe" file and did what #6 suggests and it worked.
I love our community!!!
Thanks guys!!!