Brother, I encountered a bug in my current project that cannot be reproduced
The specific performance is:
The node command line shows that the request can be received
Received at the front desk No response from any server
The front desk post data to the background, the database is not written
Restart the node program to work normally
With database crash, no data is lost, causal relationship cannot be confirmed, and it does not occur at the same time
Currently there is no solution, and the problem cannot be reproduced. There are only some guesses:
node exception Node seems to be blocked when executing a certain part of the program, but the program is all written asynchronously. I haven’t seen any useful synchronization at present. I am not familiar with the bottom layer of node and don’t know. Does this situation exist?
Database exception This seems more reasonable, because the command line prints, indicating that the program should not be dead, and then the request to the database is never returned. The program seems to be suspended, but there is something strange. Where, because there is an error in the database, why can restarting the node program work normally?
Database driver exception If this is the case, it seems that restarting the program will be normal and there is an explanation. The driver settings should be no problem
node version: 6.10.* LTS Framework: express
Server: win server 2012
Database: arangodb Driver: arangojs
I want to ask everyone a question:
I saw an article on the Internet about the instructions for node to count the running time of each function... I forgot to record it (embarrassing). I can't find it even if I search it. Does anyone know?
Has anyone encountered similar problems? What is the reason and how to debug and solve it?
How to create something in node.js or express that will not be processed if the response time exceeds a certain value
Any suggestions
happy holiday
I have encountered a similar situation. The database is MySQL. The reason is that high concurrency generates a large number of database connections. On the one hand, the database has a limit on the number of connections. On the other hand, the program does not disconnect the database after the operation is completed. Or the pool connection pool has not been released, for reference only.