Closed
Bug 1387258
Opened 7 years ago
Closed 7 years ago
Use MySQL 5.7's max_execution_time to limit the maximum SELECT query duration
Categories
(Tree Management :: Treeherder: Infrastructure, enhancement, P1)
Tree Management
Treeherder: Infrastructure
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: emorley)
References
Details
Attachments
(1 file)
63 bytes,
patch
|
camd
:
review+
dividehex
:
review+
|
Details | Diff | Splinter Review |
Once we're using MySQL 5.7 we can use the new setting to prevent runaway SELECT queries like the ones that caused bug 1386331:
https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_execution_time
Enabling this setting will be easy, picking a value that doesn't break known longer-running background tasks will be harder.
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → emorley
Assignee | ||
Comment 1•7 years ago
|
||
(In reply to Ed Morley [:emorley] from comment #0)
> Enabling this setting will be easy, picking a value that doesn't break known
> longer-running background tasks will be harder.
From first glance:
* Web transactions already get cut off at <30 seconds, so won't be affected by anything higher than that
* The max_execution_time setting only applies to SELECTs not any queries that cause data modification
* The only non-web transactions that get anywhere close to say 60 seconds are the calculate_durations task (which is already broken so can be ignored), the runnable_jobs API (occasionally), and possibly parts of cycle data (though I can't tell since that's already broken at the moment it would appear, sigh).
As such I think we're safe to go with a value like 60s with little impact on legitimate queries.
Assignee | ||
Comment 3•7 years ago
|
||
Attachment #8899815 -
Flags: review?(cdawson)
Updated•7 years ago
|
Attachment #8899815 -
Flags: review?(cdawson) → review+
Assignee | ||
Updated•7 years ago
|
Attachment #8899815 -
Flags: review?(jwatkins)
Updated•7 years ago
|
Attachment #8899815 -
Attachment is patch: true
Attachment #8899815 -
Attachment mime type: text/x-github-pull-request → text/plain
Attachment #8899815 -
Flags: review?(jwatkins) → review+
Comment 4•7 years ago
|
||
Merged and deployed.
Assignee | ||
Comment 5•7 years ago
|
||
Many thanks!
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•