D
D
Dannerty2018-12-03 13:58:08
PostgreSQL
Dannerty, 2018-12-03 13:58:08

Postgresq query timeout?

Hello. Tell me how to disable the timeout in postgresql for queries?
There is a script that executes queries to the database, periodically they fall with the error "ERROR: statement execution canceled due to timeout", while if the query is executed manually, then everything works properly.
lock_timeout = 0
statement_timeout = 0
Should the following parameters be changed or not?
max_standby_archive_delay
max_standby_streaming_delay
wal_receiver_status_interval
wal_receiver_timeout

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2018-12-03
@melkij

See the exact error message. Better in the original language, something could be lost in translation.
In the list of translations I see:

msgid "canceling statement due to conflict with recovery"
msgstr ""
"statement execution canceled due to conflict with recovery process"
--
#, c-format
msgid "canceling statement due to lock timeout"
msgstr "statement execution canceled due to timeout locks"
--
#, c-format
msgid "canceling statement due to statement timeout"
msgstr "statement execution canceled due to timeout"

"canceling statement due to statement timeout" is strictly about statement_timeout. It means that for that transaction it is not 0.
It is impossible to forbid the client to set a timeout for himself. Look for where the timeout is set before this request.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question