Get the App
SLTechnology News&Howtos  ›  Development  › 

How to analyze the Mysql error caused by php's slow log

Shulou Source: shulou.com Published: 2022-06-03 08:11:28 11月15日 Update

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!

Tags: Problems logs analysis errors slow learning more programs help loops utility next background articles methods time theory knowledge programs articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn NVidia Xiaomi Microsoft macOS