Skip to content

"Transaction is not started" solved by changing log level on the Repo.insert #4783

Description

@lessless

Elixir version

1.18.4

Database and Version

PostgreSQL 17.9 (GCP)

Ecto Versions

3.14.1

Database Adapter and Versions (postgrex, myxql, etc)

0.19.3

Current behavior

A Repo.insert() failed with ** (DBConnection.TransactionError) transaction is not started

Just one in the whole database.

I changed it to Repo.insert(log: :error), pasted the module in the remote shell, and it worked.
I then changed the statement back to how it was, pasted the module again, and it continued to work.

That was consistent across two nodes.

Expected behavior

Repo.insert() doesn't fail with ** (DBConnection.TransactionError) transaction is not started or gives a useful debugging information.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions