有没有办法找出哪个网页与哪个查询相关联?
我正在运行一个 LAMP 堆栈。当我进入 phpmyadmin 时,我可以看到有相当多的睡眠连接可能应该关闭。有没有办法使用 Apache 或 MySQL 来确定在哪些页面上创建这些连接?
I'm running a LAMP stack. When I go into phpmyadmin, I can see that there are quite a number of sleeping connections which probably should be closed. Is there a way, using either Apache or MySQL, to determine on which pages those connections are created?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要从 PHP 脚本记录一些详细信息,以下内容可能会有所帮助:
然后你可以跟踪从 phpmyadmin 看到的挂起连接。
You will need to log some details from PHP scripts, the following might help:
Then you can trace the hanging connections seen from phpmyadmin.