When testing the concurrent sending of coupons to users in the test environment, a deadlock occurred. This was solved by searching for relevant information, so I wanted to summarize it, so the following article is mainly about a Mysql deadlock troubleshooting process. The full record is available for reference if needed. I hope you can find it helpful. Preface The database deadlocks I encountered before were all deadlocks caused by inconsistent locking orders during batch updates, but last week I encountered a deadlock that was difficult to understand. I took this opportunity to re-learn mysql deadlock knowledge and common deadlock scenarios. After multiple investigations and discussions with colleagues, I finally discovered the cause of this deadlock problem, and gained a lot. Although we are back-end programmers, we do not need to analyze lock-related source code as deeply as DBAs, but if we can master basic deadlock troubleshooting methods, it will be of great benefit to our daily development. PS: This article will not introduce the basic knowledge of deadlock. For the locking principle of MySQL, you can refer to the link provided in the reference material of this article. The cause of deadlock will first introduce the database and table situation. Because it involves real data within the company, the following is simulated and will not affect the specific analysis. We are using version 5.5
1. Full record sharing of Mysql deadlock troubleshooting process
Introduction: When testing the concurrent sending of cards and coupons to users in the test environment, a deadlock occurred. This was solved by searching for relevant information, so I wanted to summarize it, so the following article mainly This is a complete record of a Mysql deadlock troubleshooting process. Friends who need it can refer to it. I hope you can find it helpful.
2. Remember nginx 504 Gateway Time-out 504 time out nginx 504 gateway 504 gateway
Introduction: 504 gateway time-out: Remember nginx 504 Gateway Time-out once: When the program executed an excel export task today, an nginx time-out prompt appeared. nginx 504 Gateway Time-out troubleshooting process: Check the task and find that the content is a data volume There are 20,000 pieces of information. Each piece of information has 50 fields. This problem occurred when exporting to excel. The execution time was about 10 minutes before a timeout occurred. Analysis: Nginx 504 Gateway Time-out means that the requested gateway was not requested. To put it simply, there is no request to
3. Remember nginx 504 Gateway Time-out once, nginxtime-out_PHP tutorial
Introduction: Remember nginx 504 Gateway Time-out, nginxtime-out. Remember nginx 504 Gateway Time-out, nginxtime-out. Today, when the program is executing an excel export task, an nginx timeout prompt appears. nginx 504 Gateway Time-out. Troubleshooting process: Check
4. Remember once nginx 504 Gateway Time-out, nginxtime-out
Introduction: Remember once nginx 504 Gateway Time-out, nginxtime-out. Remember nginx 504 Gateway Time-out, nginxtime-out. Today, when the program is executing an excel export task, an nginx timeout prompt appears. nginx 504 Gateway Time-out. Troubleshooting process: Check
5. Use tcpdump to troubleshoot the problem of tps surge in mysql database
##Introduction: After the phenomenon goes online Habitually observe changes in the database. It was found that the tps of the database had a huge surge. Fortunately, some improvements were made to the database during Double Eleven. Although the tps of the main database soared, the overall load was not very high. But now that a problem has arisen, it still needs to be solved. The troubleshooting process determines whether it is an insert update or delete operation
6. The troubleshooting process of a php process exiting strangely
Introduction : Background Recently, an anti-spam platform was built for the XX project. The effect was good, but something strange happened. The offline scanning part will have a resident php process to process the found spam information. The resident php process always exits strangely. The php code example is as follows: ?phpwhile(1){ $content = fgets(STDIN); if(empty($content)){
[Related Q&A recommendations]:
The above is the detailed content of Detailed introduction to the investigation process. For more information, please follow other related articles on the PHP Chinese website!