请教个关于tinkphp下mysql查询缓慢问题
各位好,遇到一个问题。现在的项目是基于tinkphp上面二次开发的系统,目前发现系统经常出现访问时快时慢的情况,排查了一下数据库、还有web服务器使用率都不高。
但是排查日志的时候,发现在调用数据库的时候,经常出现dump情况。麻烦各位帮忙看下,到底是怎么回事。
[07-May-2017 17:00:18] [pool www] pid 1195
script_filename = /usr/local/nginx/html/index.php
[0x00007fd033454a90] query() /usr/local/nginx/html/ThinkPHP/Library/Think/Db/Driver/Mysqli.class.php:88
[0x00007fd0334547d8] query() /usr/local/nginx/html/ThinkPHP/Library/Think/Db.class.php:773
[0x00007fd0334539a8] select() /usr/local/nginx/html/ThinkPHP/Library/Think/Model.class.php:618
[0x00007fd0334535d0] select() /usr/local/nginx/html/Application/Common/Api/ConfigApi.class.php:20
[0x00007fff42f22c90] lists() unknown:0
[0x00007fd033453290] call_user_func_array() /usr/local/nginx/html/Application/Common/Common/function.php:1054
[0x00007fd03344f360] api() /usr/local/nginx/html/ThinkPHP/Library/Think/Dispatcher.class.php:197
[0x00007fd03344eb08] dispatch() /usr/local/nginx/html/ThinkPHP/Library/Think/App.class.php:36
[0x00007fd03344e930] init() /usr/local/nginx/html/ThinkPHP/Library/Think/App.class.php:184
[0x00007fd03344d128] run() /usr/local/nginx/html/ThinkPHP/Library/Think/Think.class.php:121
[0x00007fd03344bae0] start() /usr/local/nginx/html/ThinkPHP/ThinkPHP.php:96
[0x00007fd03344b440] +++ dump failed
[07-May-2017 17:00:25] [pool www] pid 1196
script_filename = /usr/local/nginx/html/index.php
[0x00007fd033454c28] query() /usr/local/nginx/html/ThinkPHP/Library/Think/Db/Driver/Mysqli.class.php:88
[0x00007fd033454798] query() /usr/local/nginx/html/ThinkPHP/Library/Think/Db/Driver/Mysqli.class.php:209
[0x00007fd033453d88] getFields() /usr/local/nginx/html/ThinkPHP/Library/Think/Model.class.php:138
[0x00007fd033453a10] flush() /usr/local/nginx/html/ThinkPHP/Library/Think/Model.class.php:125
[0x00007fd033453498] _checkTableInfo() /usr/local/nginx/html/ThinkPHP/Library/Think/Model.class.php:1510
[0x00007fd033453018] db() /usr/local/nginx/html/ThinkPHP/Library/Think/Model.class.php:99
[0x00007fd033452888] __construct() /usr/local/nginx/html/ThinkPHP/Common/functions.php:625
[0x00007fd033451a38] D() /usr/local/nginx/html/Application/Mob/Model/ActivityModel.class.php:430
[0x00007fd033450c20] get_ActivityHallList() /usr/local/nginx/html/Application/Mob/Controller/EnterpriseController.class.php:1285
[0x00007fff42f22c50] getMore() unknown:0
[0x00007fd03344f2f8] invoke() /usr/local/nginx/html/ThinkPHP/Library/Think/App.class.php:155
[0x00007fd03344f120] exec() /usr/local/nginx/html/ThinkPHP/Library/Think/App.class.php:193
[0x00007fd03344d918] run() /usr/local/nginx/html/ThinkPHP/Library/Think/Think.class.php:121
[0x00007fd03344c2d0] start() /usr/local/nginx/html/ThinkPHP/ThinkPHP.php:96
[0x00007fd03344bc30] +++ dump failed
[07-May-2017 17:00:25] [pool www] pid 1217
script_filename = /usr/local/nginx/html/index.php
[0x00007fd033457c70] is_file() /usr/local/nginx/html/ThinkPHP/Library/Think/Cache/Driver/File.class.php:79
[0x00007fd033457690] get() /usr/local/nginx/html/ThinkPHP/Common/functions.php:1245
[0x00007fd033457590] S() /usr/local/nginx/html/Application/Common/Model/UserModel.class.php:147
[0x00007fd033457228] read_query_user_cache() /usr/local/nginx/html/Application/Common/Model/UserModel.class.php:183
[0x00007fd033455ae0] getCachedFields() /usr/local/nginx/html/Application/Common/Model/UserModel.class.php:37
[0x00007fd033455908] query_user() /usr/local/nginx/html/Application/Common/Common/query_user.php:18
[0x00007fd033455230] query_user() /usr/local/nginx/html/Application/People/Widget/HomeBlockWidget.class.php:34
[0x00007fd0334550a8] assignUser() /usr/local/nginx/html/Application/People/Widget/HomeBlockWidget.class.php:18
[0x00007fff42f22360] render() unknown:0
[0x00007fd033454dc8] call_user_func_array() /usr/local/nginx/html/ThinkPHP/Common/functions.php:771
[0x00007fd033454cd8] R() /usr/local/nginx/html/ThinkPHP/Common/functions.php:1176
[0x00007fd0334524e0] W() /usr/local/nginx/html/Runtime/Cache/Home/769e70f2e46f34ceb60619bbda5e4691.php:337
[0x00007fd033452390] +++ dump failed
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我就是通过开启slow日志看到这个情况的啊。
这些日志看不出来什么问题的。既然时快时慢,那就将php和mysql都启动slow模式分别启用来跟进查看日志看看。
排查ThinkPHP本身的日志信息