calling db.close() when the pool is set to true does not close the connection, thus mysql keeps the app open since there are pending connections.
There should be a way to close all db connections, and allow the app to finish, even if pooling is enabled.