分析 PHP 内存使用情况有什么扩展么

2017-05-12 16:48:36 +08:00
 hiboshi

xdebug,xhpof,xhpof 现在不更新了,线上 apache+php 每个 httpd 消耗 70M,压力一上来 内存全部吃掉了

3147 次点击
所在节点    PHP
7 条回复
jianzhiyao020
2017-05-12 17:35:49 +08:00
那是 apache 内存使用压力,用 nginx 吧
hongcha
2017-05-12 17:52:30 +08:00
不更新也能用呀
gouchaoer
2017-05-12 17:54:37 +08:00
apm 探针?换 nginx+php-fpm
ryancao
2017-05-12 23:33:05 +08:00
可以用其他扩展无缝替代 xhprof,推荐 Tideways ( https://github.com/tideways/php-profiler-extension ),本地可以结合 xhgui ( https://github.com/tideways/php-profiler-extension )使用,支持抽样,同时建议 nginx 里面直接 append,不用改代码(比如: fastcgi_param PHP_VALUE "auto_prepend_file=/Users/markstory/Sites/xhgui/external/header.php";)

生产环境建议推荐使用 APM 工具 ,国外可以用 new relic、app dynamics,国内有 oneapm、听云、云智慧等
mingyun
2017-05-13 00:19:02 +08:00
@ryancao nice
hiboshi
2017-05-13 08:34:09 +08:00
@ryancao 很详细感谢
kuochung
2017-05-13 10:15:50 +08:00

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/360914

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX