sidorares / sidorares/node-mysql2
idleTimeout doenst work in lambda environment?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.4k
- Forks
- 680
- Avg merge
- 9h 7m
- Merged PRs (30d)
- 59
Description
Hi! I'm building a Lambda function with Drizzle ORM (also tested with TypeORM) and I'm not sure if this is the "normal" operation. Here is the problem:
My application starts the DB connection outside the handler to reuse it between Lambda calls. To reuse the same connection, I do not kill the pool or connections. My idea is that the "idleTimeout" setting will handle this (if not reused again by other Lambda containers). Locally, this works great, but in the Lambda environment, the connections do not respect the timeouts specified in "idleTimeout," and the connection turns into a zombie connection. Am I missing something here?
My connection:
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
The only entry points named are the connection created outside the Lambda handler and the handler itself; no source file or test is provided. Start by reproducing the idleTimeout behavior in a Lambda environment and compare it with the local case, then document whether the timeout closes idle connections or identify the missing configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, mysql, node.js, typescript
- Domain
- backend, cloud, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100