gpt4 book ai didi

php - "strace"输出中的(超时)是什么意思? (mysql/php 分析)

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:14:13 25 4
gpt4 key购买 nike

我的 SQL 查询有问题,出于某种原因(我不明白),根据“strace”a(超时),它会起床运行 X 次?

poll([{fd=6, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)

执行查询的 PHP 脚本首先在数据库中查找合适的电子邮件地址是否已存在于数据库中,如果不存在,将添加该地址,如果没有发生错误,则会发送一封电子邮件。

服务器: Ubuntu 14.04.3 LTS

数据库: mysql Ver 14.14 Distrib 5.5.44,用于使用 readline 6.3 的 debian-linux-gnu (x86_64)

表:InnoDB

SQL:(示例 | 1 个查询的持续时间:0,031 秒)

SELECT SQL_NO_CACHE user_email FROM mail_logging
WHERE mail_id_fk IN (142)
AND user_email = 'tester@foo.bar'

SQL:(解释)

id  select_type table   type    possible_keys   key key_len ref rows    Extra
1   SIMPLE  mail_logging    ref id_mail,mail_id_fk,user_email   id_mail 775 const,const 1   Using where; Using index

跟踪: http://pastebin.com/FbYUZ1a3

lsof: http://pastebin.com/RyQcbWmj

编辑:谢谢@VolkerK,现在我看到了问题:P

最佳答案

我认为这表明轮询调用已超时结束。来自 poll 手册页:

The timeout argument specifies the minimum number of milliseconds that poll() will block. (This interval will be rounded up to the system clock granularity, and kernel scheduling delays mean that the blocking interval may overrun by a small amount.) Specifying a negative value in timeout means an infinite timeout. Specifying a timeout of zero causes poll() to return immediately, even if no file descriptors are ready.

关于php - "strace"输出中的(超时)是什么意思? (mysql/php 分析),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32780217/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com