Issue 11293

Title
Allow to specify database statement timeout on RPC calls
Priority
feature
Status
testing
Nosy list
nicoe, reviewbot
Assigned to
nicoe
Keywords
review

Created on 2022-03-02.16:15:42 by nicoe, last changed 2 months ago by reviewbot.

Messages

Author: [hidden] (nicoe) Tryton committer
Date: 2022-03-02.16:15:42

It could happen that a using a function field searcher numerous time on the search bar will result in a huge query that can take up to some hours and more importantly eat up all the memory and CPU dedicated to the database.

Thankfully postgres has an option available on the sessions: statement_timeout that allows to limit the time spent on each statement of the session.

The review implements this on the RPC level and adds it on search, search_count and on the global search.
I chose the delay somehow randomly.

History
Date User Action Args
2022-04-11 17:37:54reviewbotsetmessages: + msg75600
2022-03-30 16:33:44reviewbotsetmessages: + msg74856
2022-03-25 20:04:04reviewbotsetmessages: + msg74763
2022-03-14 19:38:23reviewbotsetmessages: + msg74546
2022-03-14 18:34:04reviewbotsetmessages: + msg74544
2022-03-02 16:41:28reviewbotsetmessages: + msg74393
nosy: + reviewbot
2022-03-02 16:17:58nicoesetkeyword: + review
reviews: 366841002
2022-03-02 16:15:42nicoecreate

Showing 10 items. Show all history (warning: this could be VERY long)