Skip to content

Conversation

@ascorbic
Copy link
Contributor

Changes

Moves the storage object to a static property on AstroSession, meaning it can be reused between requests. This avoids memory leaks and excessive connections when using drivers that open persistent DB connections.

Fixes #13376

Testing

Tested manually. Passes all session tests.

Docs

@ascorbic ascorbic self-assigned this Mar 13, 2025
@changeset-bot
Copy link

changeset-bot bot commented Mar 13, 2025

🦋 Changeset detected

Latest commit: 3e4ca93

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Mar 13, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 13, 2025

CodSpeed Performance Report

Merging #13415 will not alter performance

Comparing reuse-storage (3e4ca93) with main (65903c9)

Summary

✅ 6 untouched benchmarks

@ascorbic ascorbic merged commit be866a1 into main Mar 13, 2025
16 checks passed
@ascorbic ascorbic deleted the reuse-storage branch March 13, 2025 14:04
@astrobot-houston astrobot-houston mentioned this pull request Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Memory Exhaustion: Redis sessions create a new connection on every request

2 participants