sidorares / sidorares/node-mysql2

1.0.0-rc.1 connection pool get exhausted using pool's query method

Open
#270 14 comments 1 reaction 0 assignees View on GitHub

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.query method, 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.query works just fine, pool is not getting exhausted
  • On 1.0.0-rc.1, Pool.execute works 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.