1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-03-02 23:49:19 +01:00
phorge-phorge/src
epriestley 81a7c9ac43 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:05 -07:00
..
__tests__ Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
aphront Remove the execution time limit (if any) before sinking HTTP responses 2018-07-30 10:56:05 -07:00
applications Count lines in build log slices more cheaply 2018-07-30 08:25:17 -07:00
docs Allow mailers to be explicitly marked as inbound or outbound 2018-07-30 08:25:06 -07:00
extensions Add src/extensions/ to Phabricator 2013-08-14 15:38:06 -07:00
infrastructure Allow mailers to be explicitly marked as inbound or outbound 2018-07-30 08:25:06 -07:00
view Allow navigation breadcrumbs to be marked as "always visible" so they show up on phones 2018-05-09 13:21:47 -07:00
__phutil_library_init__.php Delete license headers from files 2012-11-05 11:16:51 -08:00
__phutil_library_map__.php Add a generic PHID-based object redirection controller 2018-06-12 11:54:59 -07:00