tortoise / tortoise/tortoise-orm

Error: Resetting connection with an active transaction <asyncpg.connection.Connection object at 0x00000....>

Open
#1,094 20 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
Python
Stars
5.6k
Forks
516
Avg merge
2d 21h
Merged PRs (30d)
9

Description

Describe the bug
Every time I access the database, by create, get, save I get this error that spams my terminal and another side effect is that the data that's returned becomes None, or when I try to save data it says saved but actually isn't.

To Reproduce
I'm not even sure, this just started happening randomly and I don't know how to diagnose

Expected behavior
What should happen is that my data is returned as normal AND when saving my data is actually saved, and also my terminal isn't spammed 24/7 :c

Additional context
None that comes to mind

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The reported entry points are database create, get, and save operations, with an asyncpg connection showing an active-transaction reset error. Start by obtaining a reproducible case and tracing the transaction behavior around those operations. Done means returned data is preserved, saves persist, and the terminal is no longer spammed.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.