drizzle-team / drizzle-team/drizzle-orm

[FEATURE]: mysql2 wait_timeout in createConnection

Open
#2,634 2 comments 0 reactions 0 assignees View on GitHub
db/mysql enhancement
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Describe what you want

Allow to set the wait_timeout for new mysql connections in drizzle. https://confluence.atlassian.com/stashkb/connection-timeout-with-mysql-database-297676189.html#:~:text=MySQL%20has%20its%20wait_timeout%20variable,connection%20before%20Stash%20does%20it.

I'm having issues related with this timeout, I'm using the same instance of mysql for all application but when the database stays without requests in the last 8 hours the connection is closed.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the MySQL adapter's mysql2 createConnection path and compare its current connection options with MySQL's wait_timeout behavior described in the linked reference. Done means wait_timeout can be configured for newly created connections and the behavior is covered by an appropriate test; the issue names no source file or test, so locate those entry points first.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, typescript
Domain
backend, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.