statement_timeout issue

Поиск
Список
Период
Сортировка
От Ian Harding
Тема statement_timeout issue
Дата
Msg-id CAMR4UwHARJ-m9=wKDy_mg+tJsuzsmQWOVguFyROO5GaF8rxGqg@mail.gmail.com
обсуждение исходный текст
Ответы Re: statement_timeout issue  (Andres Freund <andres@anarazel.de>)
Re: statement_timeout issue  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
I know there are a lot of moving parts to this issue but I think I've eliminated most of them and the problem comes down to the postgresql server generating a statement_timeout error after 10 seconds when the connection statement_timeout is actually set to 15 minutes.

My web server gets a database handle which it keeps for the duration of the function that generates the response.  Multiple queries can be sent and will use the same handle. 

After getting the handle I issue "show statement_timeout" and log the result which shows 15 minutes.

84876:May  4 08:31:06 seattle-vm-1-0 nsd: STATEMENT_TIMEOUT IS:
84877-May  4 08:31:06 seattle-vm-1-0 nsd: statement_timeout = 15min

Then I send a query, and it generates a statement_timeout error after 10 seconds.

The log has a CONTEXT which indicates a foreign key lookup was going on at the time which is fine...

2018-05-04 04:05:20 PDT [62028]: [82-1] ERROR:  canceling statement due to statement timeout
2018-05-04 04:05:20 PDT [62028]: [83-1] CONTEXT:  SQL statement "SELECT 1 FROM ONLY "public"."clients" x WHERE "c_id" OPERATOR(pg_catalog.=) $1 FOR KEY SHARE OF x"
2018-05-04 04:05:20 PDT [62028]: [84-1] STATEMENT:  INSERT /*

Is there anything I'm not thinking of? 

Thanks!

- Ian

В списке pgsql-general по дате отправления:

Предыдущее
От: nikhil raj
Дата:
Сообщение: Re: How to find the hits on the databases and tables in Postgres
Следующее
От: Andres Freund
Дата:
Сообщение: Re: statement_timeout issue