When you are done using the pool, you have to end all the connections or the Node.js event loop will stay active until the connections are closed by the MySQL server.
When you are done using the pool, you have to end all the connections or the Node.js event loop will stay active until the connections are closed by the MySQL server. This is typically done if the pool is used in a script or when trying to gracefully shutdown a server.
MySQL Pool