简体   繁体   English

PHP session 锁定问题

[英]PHP session lock issue

PHP Warning: session_start(): Unable to clear session lock record in /var/www/efs/html/v43/Api/PortalApi/PortalApi.php on line 39 PHP Warning: session_start(): Unable to clear session lock record in /var/www/efs/html/v43/Api/PortalApi/PortalApi.php on line 39

When multiple request are made simultaneously, the above issue occurs in one of our dev environment but other environments are working fine.当同时发出多个请求时,上述问题发生在我们的一个开发环境中,但其他环境运行良好。 could not resolve the reason for it.无法解决它的原因。

Your problem was the user concurrency.您的问题是用户并发性。

Setting the following ini settings (also from PHP directly) can help to mitigate this issue on a high load project设置以下 ini 设置(也直接来自 PHP)可以帮助缓解高负载项目上的这个问题

I recommend disable session.lazy_write in php.ini我建议在 php.ini 中禁用 session.lazy_write

You can try this too:你也可以试试这个:

ini_set('memcached.sess_lock_retries', 10);
ini_set('memcached.sess_lock_wait_min', 1000);
ini_set('memcached.sess_lock_wait_max', 2000);

We fixed the issue, the problem -> in a recent code change in dev environment multiple logs was added in the code for testing configuration, the writing of multiple logs directly to efs caused the slow down我们修复了这个问题,问题 -> 在开发环境中最近的代码更改中,在测试配置的代码中添加了多个日志,将多个日志直接写入 efs 导致速度变慢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM