欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

"MySQL server has gone away" selecting from semaphore table 有大用 有大大用

从信号量表中选择“MySQL 服务器已消失”

你好,

每次清除缓存、安装/卸载模块或更改视图等时,我都会遇到此类错误。几秒钟后,出现白屏并显示此类错误:

处理异常时抛出额外的未捕获异常。
原始
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),但没有任何改变。

每次出现这些错误时,我都必须重新启动服务器或等待几个小时才能使网站再次运行。

您能帮忙解决这个问题吗?

谢谢

评论

y_drupal_uk创建了一个问题。参见原文摘要

y_drupal_uk 的图片

问题摘要:查看更改
西莱芬的图片

标题:处理异常时抛出额外的未捕获异常。» 从信号量表中选择“MySQL 服务器已消失”
优先事项:主要的“ 普通的
问题标签:-处理异常时抛出额外的未捕获异常

支持请求是正常优先级。如果这被证明是一个错误,它可能会被提升为主要错误。

这肯定是一个重复的问题

版本:7.42» 7.x-开发

现在针对将进行更改的开发版本提交核心问题。在问题评论中记录您正在使用的特定版本。有关选择版本的更多信息

托马斯瓦尔特的图片

这对我的 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

y_drupal_uk created an issue. See original summary.

y_drupal_uk’s picture

Issue summary:View changes
cilefen’s picture

Title:Additional uncaught exception thrown while handling exception.» "MySQL server has gone away" selecting from semaphore table
Priority:Major» Normal
Issue tags:-Additional uncaught exception thrown while handling exception

Support requests are normal priority. If this turns out to be a bug, it could be raised to major.

This is certainly a duplicate issue.

Version:7.42» 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

thomaswalther’s picture

This helped for me in mysql:

SET GLOBAL max_allowed_packet = 1024 * 1024 * 512;









来自  https://www.drupal.org/project/drupal/issues/2706375



普通分类: