有没有办法找出哪个网页与哪个查询相关联?

发布于 2024-08-29 22:00:18 字数 101 浏览 1 评论 0原文

我正在运行一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

青巷忧颜 2024-09-05 22:00:18

您需要从 PHP 脚本记录一些详细信息,以下内容可能会有所帮助:

  1. mysql_thead_id
  2. $_SERVER['PHP_SELF']
  3. $_SERVER['SCRIPT_FILENAME']

然后你可以跟踪从 phpmyadmin 看到的挂起连接。

You will need to log some details from PHP scripts, the following might help:

  1. mysql_thead_id
  2. $_SERVER['PHP_SELF']
  3. $_SERVER['SCRIPT_FILENAME']

Then you can trace the hanging connections seen from phpmyadmin.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文