Page MenuHomePhabricator

Support query timeouts via `max_statement_time` or MYSLQI_ASYNC
Closed, ResolvedPublic

Description

See T10847. If MySQL hangs (e.g., because disk space is exhausted) our recovery behavior is very bad.

The max_statement_time / max_execution_time options introduced in MySQL 5.7.4, or client-side mechanisms via MYSLQI_ASYNC, would allow us to recover from this situation (at least, in web processes) far more gracefully.

Event Timeline

D15781 is promising and it looks like we can do this purely on the client if it has relatively old PHP, without requiring relatively new MySQL and special configuration on the server.

This is also maybe a good time to fix all the bad old mysql vs mysqli stuff, mostly:

This has been live for some time now.

T11044 is probably a better followup for the MySQL parts of T2383.