How to analyze the Mysql error caused by php's slow log
This article mainly introduces "how to analyze the Mysql error problem caused by php's slow log". In daily operation, I believe many people have doubts about how to analyze the Mysql error problem caused by php's slow log. Xiaobian consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubt of "how to analyze the Mysql error problem caused by php's slow log". Next, please follow the editor to study!
Problem: when executing the program, it will report 2013 (Lost connection to MySQL server during query)
Analysis:
1) in our daemon, a loop is executed (> 300 times) and a SQL statement is repeated in the loop
2) the access log of Nginx. Each execution time of the program is about 12 seconds.
3) modify the mysql connection class. Before query, the execution of mysql_ping is also invalid, and the problem remains.
At this point, the study on "how to analyze Mysql errors caused by php's slow log" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!