After installing the LU 7.x.-2.x-dev I'm getting this error:
Additional uncaught exception thrown while handling exception.
Original
PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away:
here comes a large amount of text… the beginning:
INSERT INTO {batch} (bid, timestamp, token, batch) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array ( [:db_insert_placeholder_0] => 32 [:db_insert_placeholder_1] => 1395887956 [:db_insert_placeholder_2] => bsjukogPPsnqF6fWkz2-rfahWrmAQwBquw8qe-OoF9s [:db_insert_placeholder_3] => a:13:{s:4:"sets";a:4:{i:0;a:15:{s:7:"sandbox";a:0:{}s:7:"results";a:0:{}s:7:"success";b:0;s:5:"start";i:0;s:7:"elapsed";i:0;s:5:"title";s:21:"Updating translations";s:16:"progress_message";s:0:"";s:13:"error_message";s:33:"Error importing translation files";s:8:"finished";s:32:"l10n_update_batch_fetch_finished";s:4:"file";s:57:"sites/all/modules/contr/l10n_update/l10n_update.batch.inc";s:12:"init_message";s:23:"Inicjowanie.<
Uncaught exception thrown in session handler.
PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT 1 AS expression FROM {sessions} sessions WHERE ( (sid = :db_condition_placeholder_0) AND (ssid = :db_condition_placeholder_1) ); Array ( [:db_condition_placeholder_0] => 5a6XZrnv2llzp2tPd_jtIVZfI4buKKXBb4Hq0X8kktA [:db_condition_placeholder_1] => ) in _drupal_session_write() (line 209 of /home/xyz/domains/abc.com/public_html/includes/session.inc).
Uncaught exception thrown in shutdown function.
PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: DELETE FROM {semaphore} WHERE (value = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 165846628153338f57325063.34020586 ) in lock_release_all() (line 269 of /home/xyz/domains/abc.com/public_html/includes/lock.inc).
It happens everytime while enabling any module and LU itself. After refreshing (F5), the site works with enabled modules. After disabling the LU module everything works without errors.
I have another site that uses the same LU dev version and there are no errors.
I do know the trick with max_allowed_packet, I have set this value to max_allowed_packet = 1024M
, but the error still persists.
Comment | File | Size | Author |
---|---|---|---|
#11 | Screenshot at Aug 20 19-59-17.png | 238.6 KB | vindesh |
Comments
Comment #1
Sutharsan CreditAttribution: Sutharsan commentedNeed more information to determine the cause of the problem.
Comment #2
Sutharsan CreditAttribution: Sutharsan commentedNo response received. closing the issue. Feel free to re-open if you can provide details to reproduce the situation.
Comment #3
s427 CreditAttribution: s427 commentedFYI I seem to have the same problem. I didn't think it could come from the LU module, but after finding this page I tried disabling it and it seems that the problem has indeed gone away.
I'm working on a local installation (Win8.1, XAMPP) and I make quite a lot of testing with a lot of enabled modules, so it's possible the problem comes from a combination of modules. (Or from the simple fact that there are a lot of them?)
The error message is HUGE (1,8MB of text!!!) and follows the same structure as the one posted by LaTradia (3 "general errors"), although the tables involved are not exactly the same. It occurs every time I try to enable a module, but fortunately it doesn't prevent the module from being enabled, nor does it affect the module afterwards (as far as I can tell). I saved it in a text file, so I can send it if you think it can help. I'm copying a sample below.
Here's a list of all modules I have enabled at the moment (excluding core modules):
And here's a sample of the 3-parts error message. The first part is the longest (like I said, about 1,8MB of text) so I don't include all of it, but the 2 other parts are shorter and included entirely:
Comment #4
s427 CreditAttribution: s427 commentedAlmost forgot to answer Sutharsan's questions. ^^
The wait_timeout setting (according to phpMyAdmin) is 28,800.
Time before the error occurs (with LU enabled): around 12 seconds
Time to enable a module (with LU disabled): around 15 seconds
Also interesting: if I change the max_allowed_packet setting in my.ini (from 1M to 16M), the problem goes away (for now, anyway).
Comment #5
Sutharsan CreditAttribution: Sutharsan commentedYou may have a general performance problem, 15 seconds to enable a module is very long. For comparison, on my laptop it takes a site with 52 modules 5 seconds to enable a module.
Comment #6
buddy.mayank CreditAttribution: buddy.mayank commentedI am new to Drupal, from past 2 month I have tried learning concept of drupal and was really happy to use this powerful CMS.
But yesterday when visited Configuration > Search and Metadata > URL aliases > Pattern (i.e http://localhost/admin/config/search/path/patterns), I got following error page
Additional uncaught exception thrown while handling exception.
Original
PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT 1 AS expression FROM {variable} variable WHERE ( (name = :db_condition_placeholder_0) ); Array ( [:db_condition_placeholder_0] => drupal_css_cache_files ) in variable_set() (line 991 of /home/www/icts-website/includes/bootstrap.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:235:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT 1 AS expression FROM {variable} variable WHERE ( (name = :db_condition_placeholder_0) ); Array ( [:db_condition_placeholder_0] => drupal_css_cache_files ) ";s:9:"%function";s:14:"variable_set()";s:5:"%file";s:45:"/home/www/icts-website/includes/bootstrap.inc";s:5:"%line";i:991;s:14:"severity_level";i:3;} [:db_insert_placeholder_4] => 3 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => http://localhost/admin/config/search/path/patterns [:db_insert_placeholder_7] => http://localhost/ [:db_insert_placeholder_8] => 10.0.8.14 [:db_insert_placeholder_9] => 1444714070 ) in dblog_watchdog() (line 160 of /home/www/icts-website/modules/dblog/dblog.module).
Uncaught exception thrown in shutdown function.
PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: DELETE FROM {semaphore} WHERE (value = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 399784779561c9655b48719.42544548 ) in lock_release_all() (line 269 of /home/www/icts-website/includes/lock.inc).
I tried googling for solution and I found that increasing max_allowed_packet to 32M in my.cnf will help resolve the error. But unfortunately the error still persist even after increasing max_allowed_packet to 32M
I will really appreciate your help with the above issue.
Thank and Regards,
Mayank
Comment #7
grougy CreditAttribution: grougy commentedI had the same problem and increasing the max_allowed_packet to 32M in mysqld section of my.ini conf file has solved the error issue when enabling LU.
Comment #8
janspeer CreditAttribution: janspeer commentedError 2006: MySQL server has gone away
after installing
anonimous_publishing
i10n_update
advanced_forum
search_by_page
in enabled all 4 at the same time
now have the error : Error 2006: MySQL server has gone away
--> and now when disabling/enabling one of the above i also had 'table already exist'
on testsite : enabled them one by one : and did not have the error
Comment #9
ckvadher CreditAttribution: ckvadher commentedSame error
Comment #10
FrancewhoaComment #11
vindesh CreditAttribution: vindesh as a volunteer and for Tecquia Systems commented[Thu Aug 20 19:43:07.223888 2020] [php7:notice] [pid 1494] [client 127.0.0.1:52330] Drupal\\Core\\Database\\DatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO {cache_bootstrap} (cid, expire, created, tags, checksum, data, serialized) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3......
I had the similar problem and increasing the max_allowed_packet to 128M/512M in mysqld section of my.cnf conf file has solved the error
Set in my.cnf configuration file
In /etc/my.cnf, change variables like:
$ sudo nano /etc/my.cnf
-----------------------------
[mysqld]
max_allowed_packet=512M
-----------------------------
If you do not find my.cnf file on your machine than you can create my.cnf conf file and write above code.
mysql Ver 14.14 Distrib 5.7.28, for macos10.14 (x86_64) using EditLine wrapper
macOS Catalina
Version: 10.15.3
OR
From command line login to mysql
$ mysql -u root -p
Enter password:
mysql> SET GLOBAL max_allowed_packet = 1024 * 1024 * 512;
its done.
It is working for me.
Check the updated variable value on your phpmyadmin variable list.
Comment #12
thomaswalther CreditAttribution: thomaswalther commented#11 worked for me:
SET GLOBAL max_allowed_packet = 1024 * 1024 * 512;
Comment #13
Samerali88 CreditAttribution: Samerali88 commented#11 Thanks it's worked
SET GLOBAL max_allowed_packet = 1024 * 1024 * 512;
Comment #14
thallesIf you use lando:
.lando.yml