How can I track down CPU intensive requests in mod_perl?

孤者浪人 提交于 2019-11-30 22:25:37

Devel::NYTProf is pretty much the premier profiler for Perl right now, with Devel::NYTProf::Apache for easily profiling mod_perl applications.

See Tim Bunce: NYTProf v2 – A major advance in perl profilers for a pretty overview with pictures.

Unfortunately, Devel::NYTProf isn't pre-packaged in Ubuntu Hardy. (It is pre-packaged in Jaunty, Karmic, Lucid, and later.) You can either use some apt trickery to install packages from those distributions, install from CPAN, or just upgrade ;-)

If you have a large subversion repository and path-based authorization enabled in your apache configuration you're going to see some long-running, high CPU apache tasks. You'll probably also have complaints from subversion users about slow commits and updates, along with 503 errors and subversion complaining about truncated SSL responses. If this is the case, I'd make subversion my prime suspect.

Use a custom log format or a write a PerlLogHandler that records the request information along with the PID and resource use information. See, for instance, Randal's Web Techniques Column 48.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!