Using mysql.createPool(): Getting "ER_CON_COUNT_ERROR: Too many connections"
See original GitHub issueWe used to use mysql.createConnection()
, but recently switched to start using connection pools (mysql.createPool()
). Once we did the switch we started getting the following errors when running a load test,
ER_CON_COUNT_ERROR: Too many connections
.
Any idea why this could be happening? When we switched back to calling createConnection() we don’t get the error.
We had setup the pool with connectionLimit: 30. We called pool.query()
instead of calling pool.getConnection()
connection.query() and then connection.release()
after each query. What we understood was that pool.query() does that for you, and calling getConnection explicitly was for transactions etc.
Everything else is the same.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Too many connections error in node-mysql - YouTube
MySQL : ER_CON_COUNT_ERROR: Too many connections error in node- mysql [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@roshanpaiva Hi, I have just met this problem, My solution is reduce the
connectionLimit
Try itGlad to hear, @roshanpaiva ! That would make sense why I didn’t hear back. Sorry to bother you 😃