Hi! I'm being incredibly cheap and running a mysql+node project on heroku. The super cheap DB option has a hard limit of 10 connections to mysql. Heroku often "suspends" applications when they aren't in use, but that doesn't disconnect the sequelize client from mysql. I can catch the SIGTERM
and call a disconnect when the app is "suspending", but how would I disconnect the client?
sequelize.close()
is available on 2.0.0-dev13 and up i believe.
Do however note that there is no equivalent reconnect method so you won't be able to use that particular instance again
Thanks for the info! My desire is to have a "clean" shutdown where all connections my app has open can be closed, and sequelize.close()
is exactly what I need.
Most helpful comment
sequelize.close()
is available on 2.0.0-dev13 and up i believe.