V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
hiboshi
V2EX  ›  PHP

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

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