1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-26 21:49:08 +01:00
phorge-phorge/src/aphront
epriestley 58e8d3c134 (stable) Remove the execution time limit (if any) before sinking HTTP responses
Summary:
Ref T12907. At least part of the problem is that we can hit PHP's `max_execution_time` limit on the file download pathway.

We don't currently set this to anything in the application itself, but PHP often sets it to 30s by default (and we have it set to 30s in production).

When writing responses, remove this limit. This limit is mostly a protection against accidental loops/recurison/etc., not a process slot protection. It doesn't really protect process slots anyway, since it doesn't start counting until the request starts executing, so you can (by default) //send// the request as slowly as you want without hitting this limit.

By releasing the limit this late, hopefully all the loops and recursion issues have already been caught and we're left with mostly smooth sailing.

We already remove this limit when sending `git clone` responses in `DiffusionServeController` and nothing has blown up. This affects `git clone http://` and similar.

(I may have had this turned off locally and/or just be too impatient to wait 30s, which is why I haven't caught this previously.)

Test Plan:
  - Poked around and downloaded some files.
  - Will `curl ...` in production and see if that goes better.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T12907

Differential Revision: https://secure.phabricator.com/D19547
2018-07-30 10:56:54 -07:00
..
__tests__ phtize all the things 2015-05-22 21:16:39 +10:00
configuration Modularize rate/connection limits in Phabricator 2017-10-13 13:12:05 -07:00
exception Convert some whiny exceptions into quiet MalformedRequest exceptions 2016-08-16 15:50:21 -07:00
handler Pass all Throwables to Exception Handlers, not just Exceptions 2017-06-20 05:44:51 -07:00
httpparametertype Fix spelling 2017-10-09 10:48:04 -07:00
interface Allow Controllers to return a wider range of "response-like" objects 2015-09-01 15:52:52 -07:00
response (stable) Remove the execution time limit (if any) before sinking HTTP responses 2018-07-30 10:56:54 -07:00
sink (stable) Remove the execution time limit (if any) before sinking HTTP responses 2018-07-30 10:56:54 -07:00
site Allow custom Sites to have custom 404 controllers 2016-11-30 15:25:09 -08:00
AphrontController.php Provide an AphrontController implementation of willSendResponse() 2015-09-07 17:18:35 -07:00
AphrontRequest.php Fix DocumentEngine line behaviors in Diffusion 2018-04-09 04:46:47 -07:00