FPM is maliciously compliant when asked to set opcache.preload
未关闭
还没有人认领这个 Issue。
Bug
Extension: opcache
SAPI: fpm
Status: Needs Triage
- 主要语言
- C
- 星标
- 40.4k
- 派生
- 8.2k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 96
描述
Description
The following FPM configuration:
php_value[opcache.preload] = /app/config/preload.php
php_value[opcache.preload_user] = app
results in phpinfo() advertising that config.
Yet when calling opcache_get_status(), there is no preload_statistics, and there is no performance improvement in the application.
I asked about this here, and was told that's because it is too late: when setting that config value, FPM has already started. If that's the case, I would expect an exception to be thrown, because I can think of a reason to allow editing that setting past a certain point
PHP Version
8.1.7
Operating System
Linux
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先使用 php_value[opcache.preload] 和 php_value[opcache.preload_user] 复现 FPM 配置,然后将 phpinfo() 与 opcache_get_status() 进行比较。追踪 FPM 相对于 opcache 预加载初始化应用这些设置的时机;完成时应定义并测试预加载设置应用得太晚时的行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- php
- 领域
- backend
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100