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
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
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.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









