今天帮朋友查询wordpress执行超级慢的原因,特此记录
开启fpm的慢日志,记录执行超过30秒的脚本
request_slowlog_timeout = 30 slowlog = var/log/slow.log
查看日志
[23-May-2019 17:14:14] [pool www] pid 27993 script_filename = /www/wwwroot/www.yingxiaoshi.com/wp-admin/admin-ajax.php [0x00007fbc9c832ef8] curl_exec() /www/wwwroot/www.yingxiaoshi.com/wp-content/plugins/wp-autopost-pro/wp-autopost-function.php:2352 [0x00007fbc9c832bd0] curl_get_encoding_contents_ap() /www/wwwroot/www.yingxiaoshi.com/wp-content/plugins/wp-autopost-pro/wp-autopost-function.php:2447 [0x00007fbc9c8329b8] curl_get_contents_ap() /www/wwwroot/www.yingxiaoshi.com/wp-content/plugins/wp-autopost-pro/wp-autopost-function.php:2536 [0x00007fbc9c831f80] get_html_string_ap() /www/wwwroot/www.yingxiaoshi.com/wp-content/plugins/wp-autopost-pro/wp-autopost-function.php:5440 [0x00007fbc9c831e30] +++ dump failed
发现是wp-autopost-pro采集插件问题