Skip to content

Add database-configuration.max-lifetime, in seconds, and pass it to Sarah as the Hikari connection max lifetime - #271

Merged
Maxlego08 merged 1 commit into
Maxlego08:developfrom
dpembo:main
Oct 20, 2026
Merged

Maxlego08 merged 1 commit into
Maxlego08:developfrom
dpembo:main

Conversation

@dpembo

@dpembo dpembo commented Oct 18, 2026

Copy link
Copy Markdown

Summary

  • Add database-configuration.max-lifetime, in seconds, and pass it to Sarah as the Hikari connection max lifetime. Depends on GroupeZ-dev/Sarah#24, which adds DatabaseConfiguration.withMaxLifetime.
  • 1800 keeps the current 30-minute behavior. 0 keeps connections until the pool closes. A missing or negative value leaves Sarah's 30-minute default in place.
  • The shared database-configuration.yml overrides the plugin config, same as the other database settings. Sarah is bumped to 1.26. in the PR

This only affects MySQL and MariaDB. SQLite does not use the pool. Hikari rejects any positive lifetime under 30 seconds. This pull request will not build until Sarah 1.26 is published.

Test plan

  • With MySQL or MariaDB, max-lifetime: 1800 connects and behaves like the previous 30-minute lifetime.
  • Setting a shorter lifetime, such as 60, is accepted by the pool.
  • max-lifetime: 0 leaves connections open until the pool closes.
  • A value under 30 seconds is rejected by Hikari.
  • Omitting the key, including from an existing config.yml, still uses 30 minutes.
  • A value in the shared database-configuration.yml overrides the plugin config.
  • SQLite storage still connects.

… Sarah as the Hikari connection max lifetime
@Maxlego08
Maxlego08 changed the base branch from main to develop October 18, 2026 20:36
@Maxlego08
Maxlego08 merged commit 99359e8 into Maxlego08:develop Oct 20, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants