简体   繁体   English

MySql-挂起的进程在哪里?

[英]MySql - Where are the pending processes?

I am launching hundreds of php scripts simultaneously. 我正在同时启动数百个php脚本。 To have an overview of the 'activty', I am doing a SHOW PROCESSLIST in mySql. 为了全面了解“活动”,我在mySql中做了一个SHOW PROCESSLIST。 This returns 5 processes including the SHOW PROCESSLIST one. 这将返回5个进程,其中包括SHOW PROCESSLIST。 So I am wondering where all the other pending processes are before being processed. 所以我想知道所有其他挂起的流程在处理之前在哪里。 Is there a command to see those? 有命令看那些吗? Thank you for your replies. 谢谢您的回复。 Cheers. 干杯。 Marc

Try this: 尝试这个:

SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST

If you not see what you are expecting, then PHP script is not making query in the time this select runs. 如果您没有看到期望的内容,则表明该选择运行时PHP脚本没有进行查询。

More info about server threads you can find here 您可以在此处找到有关服务器线程的更多信息

You can also use mysqlproxy to see everything. 您也可以使用mysqlproxy查看所有内容。

See the manual, and in particular: 请参阅手册,尤其是:

http://dev.mysql.com/doc/refman/5.6/en/show-processlist.html http://dev.mysql.com/doc/refman/5.6/en/show-processlist.html

If you have the PROCESS privilege, you can see all threads. 如果您具有PROCESS特权,则可以看到所有线程。 Otherwise, you can see only your own threads (that is, threads associated with the MySQL account that you are using) 否则,您只能看到自己的线程(即与您正在使用的MySQL帐户关联的线程)

Maybe the php script and the client doing SHOW PROCESSLIST are using a different account ... 也许php脚本和执行SHOW PROCESSLIST的客户端正在使用其他帐户...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM