VestaCP面板载入响应缓慢问题解决

02/03/2018

今天小伙伴向Kaijia反映万年没有动的VestaCP面板突然间响应缓慢,Kaijia登录检查发现每次点击VestaCP面板中任意功能,均需要等待3~5秒时间才能响应,而同时间服务器并无高负载、高IO情况,VestaCP管理下的网页亦可飞速打开。

为了找到延时原因,Kaijia在/usr/local/vesta/php/etc/php-fpm.conf开启了VestaCP的慢执行日志(slow log),获得以下记录:

[03-Feb-2018 23:00:54]  [pool www] pid 2721
script_filename = /usr/local/vesta/web//list/web/index.php
[0x00007f8ead529798] exec() /usr/local/vesta/web/list/web/index.php:9

[03-Feb-2018 23:01:03]  [pool www] pid 2721
script_filename = /usr/local/vesta/web//list/web/index.php
[0x00007f8ead529708] shell_exec() /usr/local/vesta/web/list/web/index.php:12

再返回查看代码,显示所有的慢执行均发生在exec()shell_exec()函数调用VestaCP CLI管理脚本时。

阅读更多