今天帮朋友查询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采集插件问题
<?php echo similar_text("Hello World","Hello Shanghai"); ?> 2.计算两个字符串的相似度,并返回百分比 <?php similar_text("...
首先下载wkhtmltox-0.12.4_linux-generic-amd64.tar.xz (不要下载RPM包,依赖太多,需要x-server支持),并解压,执行测试运行正常tar wkhtmltox-0.12.4_linux-generic-amd64.tar.xzcd...
php调用Webservice基本语法如下:$url ='xxxxxxx.cn' //链接服务器端 $client = new SoapClient($url);通过以上语法已经连接到webservice,也可将wsdl在本地使用,...
项目需要使用websocket推送最新订单,客户服务器非linux不支持swoole,因此使用原生,直接上代码(1).PHP服务端<?php ini_set('error_reporting', E_ALL ^ E_NOTICE); ini_set...
重构框架的时候想要考虑支持下cli模式,于是参考了thinkphp的底层。/** * 获取应用根目录 * @return string */ public static function getRootP...
参数中包含gb2312的字符串,返回结果是false或者null(不同PHP版本具有差异性)代码:<?php $dbms = 'mysql'; $host = '192.168.8.8'; $dbName =&n...