2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ERROR: 57014: canceling statement due to user request

Last updated at Posted at 2021-12-10

ERROR: 57014: canceling statement due to user requestのエラーの原因

【前提】 ・接続タイムアウトやコマンドタイムアウト設定は100秒以上 ・普通のSELECTクエリの実行 ・サーバーおよびNpgsqlを使用しているクライアント側にて、実行から最長でも1秒程度で「ERROR: 57014: canceling statement due to user request」が発生。 ・その前後や同時刻頃の別端末では発生なし ・対象テーブルのレコード数も1000件程度

【原因】
・SQL 実行中に DB クライアントから明示的にキャンセルが発行された場合(DB クライアント側でタイムアウト制御をしていたり、psql で Ctrl-C が押下された場合など)
・SQL 処理を担当している postgres プロセスに INT シグナルが送信された場合に発生。
・クライアントがサーバに大量のリクエストを送った後に応答を待つ時に、クライアント側のタイムアウト制御に引っ掛かり、クライアント側からキャンセル処理が送られていることが考えられる。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?