你好,
每次清除缓存、安装/卸载模块或更改视图等时,我都会遇到此类错误。几秒钟后,出现白屏并显示此类错误:
处理异常时抛出额外的未捕获异常。
原始
PDOException: SQLSTATE[HY000]: 一般错误: 2006 MySQL 服务器已经消失: SELECT 过期,值 FROM {semaphore} WHERE name = :name; lock_may_be_available() 中的数组( [:name] => theme_registry:runtime:seven:cache )(/var/www/clients/client2/web19/web/includes/lock.inc 的第 167 行)。
附加
PDOException:SQLSTATE[HY000]:一般错误:2006 MySQL 服务器已消失:SELECT 过期,值 FROM {semaphore} WHERE name = :name; lock_may_be_available() 中的数组( [:name] =>rules_get_cacherules_event_whitelist )(/var/www/clients/client2/web19/web/includes/lock.inc 的第 167 行)。
________________________________________
关闭函数中抛出未捕获的异常。
PDOException: SQLSTATE[HY000]: 一般错误: 2006 MySQL 服务器已经消失: DELETE FROM {semaphore} WHERE (value = :db_condition_placeholder_0) ; lock_release_all() 中的数组( [:db_condition_placeholder_0] => 1917749777570f6780cbc894.71899901 )(/var/www/clients/client2/web19/web/includes/lock.inc 的第 269 行)。
...
我将max_allowed_packet增加到一个非常高的值(2048M),但没有任何改变。
每次出现这些错误时,我都必须重新启动服务器或等待几个小时才能使网站再次运行。
您能帮忙解决这个问题吗?
谢谢
评论
评论#2
y_drupal_uk 信用归因: y_drupal_uk评论了登录或注册后发表评论
评论#3
西乐芬 信用归因:西莱芬评论了支持请求是正常优先级。如果这被证明是一个错误,它可能会被提升为主要错误。
这肯定是一个重复的问题。
登录或注册后发表评论
评论#5
托马斯瓦尔特 信贷归因:托马斯瓦尔特评论了这对我的 mysql 有帮助:
SET GLOBAL max_allowed_packet = 1024 * 1024 * 512;
登录或注册后发表评论
"MySQL server has gone away" selecting from semaphore table
Hi,
I had this kind of errors every time I clear the cache, or install/uninstall modules, or make changes on views...etc. After a few seconds a white screen appears with this kind of errors:
Additional uncaught exception thrown while handling exception.
Original
PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT expire, value FROM {semaphore} WHERE name = :name; Array ( [:name] => theme_registry:runtime:seven:cache ) in lock_may_be_available() (line 167 of /var/www/clients/client2/web19/web/includes/lock.inc).
Additional
PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT expire, value FROM {semaphore} WHERE name = :name; Array ( [:name] => rules_get_cacherules_event_whitelist ) in lock_may_be_available() (line 167 of /var/www/clients/client2/web19/web/includes/lock.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] => 1917749777570f6780cbc894.71899901 ) in lock_release_all() (line 269 of /var/www/clients/client2/web19/web/includes/lock.inc).
...
I increased the max_allowed_packet to a very high value (2048M) but nothing changed.
Every time these errors appear, I have to restart the server or wait for a few hours to make the website working again.
Could you help to solve this issue please?
Thank you
Comments
Comment#2
y_drupal_uk CreditAttribution: y_drupal_uk commentedLog in or register to post comments
Comment#3
cilefen CreditAttribution: cilefen commentedSupport requests are normal priority. If this turns out to be a bug, it could be raised to major.
This is certainly a duplicate issue.
Log in or register to post comments
Comment#5
thomaswalther CreditAttribution: thomaswalther commentedThis helped for me in mysql:
SET GLOBAL max_allowed_packet = 1024 * 1024 * 512;
来自 https://www.drupal.org/project/drupal/issues/2706375