Skip to content

Fix database connection leaks#1215

Merged
anfimovdm merged 2 commits into
masterfrom
db-leaks
May 12, 2026
Merged

Fix database connection leaks#1215
anfimovdm merged 2 commits into
masterfrom
db-leaks

Conversation

@anfimovdm
Copy link
Copy Markdown
Contributor

No description provided.

anfimovdm added 2 commits May 12, 2026 19:43
Skipping re-init when a factory already existed left the engine bound to
a stale event loop in tests (each module gets its own loop under anyio),
causing asyncpg 'attached to a different loop' and 'another operation in
progress' errors. Dispose the existing engine first so each call gets a
fresh engine on the current loop while still avoiding the original leak
in dramatiq actors.
@anfimovdm anfimovdm merged commit 96fdc04 into master May 12, 2026
2 checks passed
@anfimovdm anfimovdm deleted the db-leaks branch May 12, 2026 17:11
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.

1 participant