ecto_sql icon indicating copy to clipboard operation
ecto_sql copied to clipboard

could not cancel backend errors

Open sasa1977 opened this issue 11 months ago • 5 comments

Elixir version

Elixir 1.14.5

Database and Version

PostgreSQL 13.11

Ecto Versions

3.11.1

Database Adapter and Versions (postgrex, myxql, etc)

0.17.4

Current behavior

After migrating to the latest ecto_sql and postgrex, we see the following log entries when running some mix tasks such as ecto.migrate:

[error] Postgrex.Protocol #PID<0.8748.0> could not cancel backend: tcp connect: no such file or directory - :enoent

These appear a few times, but otherwise everything works fine. This isn't happening when running the app or tests.

Moving back to postgrex 0.17.3 gets rid of these errors. Also, if I just comment out exit trap, added in https://github.com/elixir-ecto/postgrex/commit/c8edce44047fba8d517e9f94efac7d9fb607e32d, the errors are gone.

I'm not sure whether this is a postgrex or ecto_sql error, but I figured I'd report here, as the error seems to occur only in the migration tasks.

Expected behavior

We shouldn't see these error entries.

sasa1977 avatar Mar 01 '24 07:03 sasa1977

Do you have a stack trace associated to these logs?

josevalim avatar Mar 01 '24 07:03 josevalim

There is no stack trace, just these errors.

sasa1977 avatar Mar 01 '24 07:03 sasa1977

I pushed a fix to PostgreSQL main. Basically removing the logs. Can you please try it out?

josevalim avatar Mar 01 '24 08:03 josevalim

Errrrrr. Postgrex. :D

josevalim avatar Mar 01 '24 08:03 josevalim

Tried it locally and I don't get those errors anymore.

sasa1977 avatar Mar 01 '24 09:03 sasa1977