Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
New queries hang when a client connection is closed after the 100 ms period of inactivity #1244
I'm experiencing some issues with queries that hang up randomly. I'm developing a RESTful API with sequelize (using MySQL) and until now I have not experienced any problems at all. Last month we updated sequelize to the latest stable version (1.6.0) and now when I run our API test suite (which is predictable and constant), there is a specific test case that hangs up sometimes. I've tracked down the issue and I think I've found the problem (or problems).
The thing is that sequelize closes a connection after 100 milliseconds of inactivity, all good so far. But when a query is issued after that 100 ms period of inactivity, it happens to be sent to the mysql module after calling the
The thing is that in this short period of time a query may be issued and the client instance is still available in the connection-manager, but it is already closed to new queries. In this situation, the mysql module emits an error in the
This only happens when pooling is disabled.