Josh98

Josh98

Postgres Error `(Postgrex.Error) ERROR 57014 (query_canceled) canceling statement due to user request`

There are unique fields in the User table which can cause conflicts. So we introuduced the on_conflict: :nothing.

Repo.insert_all(
  User,
  [
    %{
         user_id:  user.id,
         wallet_source_id: source_id,
         number: "..." 
       },
      %{
         user_id:  user_2.id,
         wallet_source_id: source_2.id,
         number: "..." 
       }
  ],
returning: false,
on_conflict: :nothing
)

Subsequently, no unique constraint errors but we are seeing postgres throwing

** (Postgrex.Error) ERROR 57014 (query_canceled) canceling statement due to user request

Any insights to the possible root cause?

First Post!

joe

joe

We are experiencing the same query_canceled issue with liveview when a user jumps to another page before the query completed. This insight might be helpful, might be misleading, I have no idea :D.

Last Post!

Exadra37

Exadra37

It can also be caused by timeout of executing the query. See this link:

Cause

This error is returned by your PostgreSQL client himself which stops the query execution, that means the query took too much time and its timeout has been reached.

The problem could be solved by changing your datasource configuration.

Where Next?

Popular in Questions Top

lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New

Other popular topics Top

KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36820 110
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement