28s) start to risk PHP killing the request at * max_execution_time on shared hosts that default to 30s; the build * still resumes safely on the next request via MAX(id) on the buffer, * but a graceful yield is preferable. */ const VIEW_BUILD_PER_STAGE_BUDGET_SECONDS = 28; /** * After this many seconds with no progress, an abandoned partial build * is considered stale: the buffer table and high-water options are * dropped on the next entry and the build restarts from scratch. * * Bumped from 600 to 3600 (2026-05-08, deadline-math-audit-2026-05-08.md * concern #3). On Bruno-scale installs (484K redirects, slow shared * host) a full build can legitimately take longer than 10 minutes; if * the user closes the browser mid-build, the prior 600s TTL would * discard the partial buffer on the next visit and force a fresh * restart, so the build never converged across sessions. 3600s (1 * hour) is long enough to survive a normal user session gap while * still bounding stale-buffer disk cost. */ const VIEW_BUILD_RESUME_TTL_SECONDS = 3600; const VIEW_BUILD_FOREGROUND_LEASE_SECONDS = 120; /** * Cap on the per-query SET STATEMENT max_statement_time hint applied * to a non-batched stage (S3 / S9 / S10) on retry after a kill. The * hint is also bounded by the request's remaining PHP execution time * minus a 2s safety margin -- this constant is the absolute ceiling * regardless of how much PHP time is left. * * 240s matches the JS poller's no-progress deadline: if a single * non-batched query needs longer than that, the user-facing UI gives * up anyway, so giving the query more time would only delay the * eventual failure. */ const VIEW_BUILD_NON_BATCHED_KILL_RETRY_CAP_SECONDS = 240; private function __construct() {} }