CANNOT ENQUEUE QUIT AFTER INVOKING QUIT DOWNLOAD
Create a connection when the server starts, and then always use the connection/client object to query it.ġ. Download Nodejs nodejs access database nodejs deployed to the web Nodejs timer Promise Error: Cannot enqueue Handshake after invoking quit. If you are serving web requests, you should not close the connection every time the request is processed.
CANNOT ENQUEUE QUIT AFTER INVOKING QUIT CODE
Apparently they pushed in unnecessary code in their last iteration that is also bugged. Solution 1: If you using the node-mysql module, just remove the. nodemodules events.js: 183 throw er // Unhandled 'error' event Error: Cannot enqueue Quit after invoking quit. I am trying to insert into MYSQL table some data recieved from AJAX post. Cannot enqueue Handshake after invoking quit. Event.js is not a part of my working files, probably is a file from. Apparently they pushed in unnecessary code in their last iteration that is also bugged. NodeJS Cannot enqueue Handshake after already enqueuing a Handshake. end() connections but it does not help Thanks in advance Radek node.jsexpress Coleman 1 Year ago Answers 1 Subscribe Submit Answer Vivienne 1 Year ago If you using the node-mysql module, just remove the. Therefore, if the number of people is small or the operation is infrequent, you can consider using this method-do not close after connection, Cannot enqueue Handshake after invoking quit If you using the node-mysql module, just remove the. Cannot enqueue Handshake after invoking quit Ive tried not to. Segui a sugesto de encadear o connection.end diretamente no connection.query mas deu certo. However, reopening the link is indeed more performance-consuming compared to the general new data operation (insert), which is about 10-100 times that of the new data operation (insert), but unless the application processes more than tens of millions of data per day, otherwise The performance loss caused by re-closing and opening the database link is not obvious. Estou tomando o erro 'Error: Cannot enqueue Quit after invoking quit.' que pelo pesquisei em outro tpico, causado pelo fluxo assincrono no node que pode estar executando o connection.end() antes mesmo da conexo ser aberta. I often get the following app crash error: 'Cannot enqueue quit after invoking quit.' My kluge solution, which doesn't work very well, is to put a setTimeout function at the end of the route to wait to give the MySQL processes enough time to finish before the connection.end () (or, in this case, pool.end ()).
TL DR You need to establish a new connection by calling the createConnection method after every disconnection. Error: Cannot enqueue Quit after invoking quit. Cannot enqueue Handshake after invoking quit.
The reason for the error is that the connection object of the database is designed so that it cannot be reconnected once it hangs.īut we still hope to end when the database is not in use because the number of connections to the database is limited. Error: Cannot enqueue Quit after invoking quit Publicado 5 anos atrs, em.