hiboshi
V2EX  ›  PHP

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

  •  
  •   hiboshi · May 12, 2017 · 4350 views
    This topic created in 3463 days ago, the information mentioned may be changed or developed.

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

    7 replies  •  2017-05-13 10:15:50 +08:00
    jianzhiyao020
    jianzhiyao020
    May 12, 2017
    1
    那是 apache 内存使用压力,用 nginx 吧
    hongcha
    hongcha
    May 12, 2017
    2
    不更新也能用呀
    gouchaoer
    gouchaoer
    May 12, 2017 via Android
    3
    apm 探针?换 nginx+php-fpm
    ryancao
    ryancao
    May 12, 2017
    4
    可以用其他扩展无缝替代 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
    mingyun
    May 13, 2017
    5
    @ryancao nice
    hiboshi
    hiboshi
    OP
    May 13, 2017
    6
    @ryancao 很详细感谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5031 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 07:10 · PVG 15:10 · LAX 23:10 · JFK 02:10
    ♥ Do have faith in what you're doing.