The server shows that the project is still running, but the call interface does not respond

Foreword:

Recently, the project suddenly reported many times that it was running, and the interface did not respond. After restarting the server, it was OK again. After a long time of trouble, the problem was finally found out. The following are the troubleshooting steps

Troubleshooting steps

1. Use Druid to monitor applications

Druid monitoring can check the interface and SQL call times, response time, call time interval,

It was found that multiple interfaces had blocking problems, and the threads were already full, so we started to optimize the interface SQL, and found that the program blocking problem could not be prevented

At the beginning of the time detection, it is found that the number of an interface being executed starts to increase and does not decrease.

Looking at the code and checking all the way, I found that the code written by my previous colleagues did not set a timeout period for accessing external requests, resulting in threads being occupied and blocked. I improved this interface, set a timeout period and responded to logs and other information when exceptions occurred

No problem for a long time

Guess you like

Origin blog.csdn.net/GuaGea/article/details/127810388