sidorares / sidorares/node-mysql2
1.0.0-rc.1 connection pool get exhausted using pool's query method
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.4k
- Forks
- 680
- Avg merge
- 9h 7m
- Merged PRs (30d)
- 59
Description
I know this is bad bug report, since I am currently not able to provide reproducible test, but anyway:
- On 1.0.0-rc.1, using
Pool.querymethod, you eat all connections and they are not released to pool (callback is never invoked and connection is not released) - On 0.15.8,
Pool.queryworks just fine, pool is not getting exhausted - On 1.0.0-rc.1,
Pool.executeworks properly, connections are successfully returning to pool
Node v5.6.0. I'll try to prepare working example for debugging, but I am in a bit of a rush here, so I don't know exactly when.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect lib/pool.js around the callback at line 134 and compare the Pool.query and Pool.execute paths. First reproduce the connection-pool exhaustion against MySQL, then verify that Pool.query invokes its callback and returns the connection to the pool, matching the behavior described for 0.15.8.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, node.js
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100