如何在 php-fpm 中找到运行的 php 文件?

问题描述

我从 top 命令中发现 php-fpm 中的 CPU 负载很高。有什么办法可以通过php-fpm找到当前正在运行的文件吗?

解决方法

您可以通过在 php-fpm 池配置中设置 pm.status_path = /status 来激活 php-fpm 状态页面。并使用 apache 或 nginx 提供该页面。

你只需要访问http://statuspage/status?full,然后你就会看到php运行脚本是这样的。

enter image description here

如果你使用nginx,你可以关注this tutorial

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...