Review main Merged

82091[BUGFIX] Set HTTP timeout to 20 seconds

Stefan Froemken CR +2 V +2 Easy +1 −1 updated 12/06/23, 21:17

Commit message

To prevent infinite outgoing requests
while using RequestFactory which will exceed
max_execution_time limitation we reduce
timeout to 20 seconds.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Oliver Klee +1
    • Stefan Bürk +1
    • HOJA M A +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Stefan Bürk +1
    • HOJA M A +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1820

  1. Stefan Froemken uploaded patch set 1 12/05/23, 13:19

  2. core-ci voted on patch set 1 V +1 12/05/23, 13:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50374

  3. HOJA M A voted on patch set 1 CR +1 12/05/23, 13:55

  4. HOJA M A voted on patch set 1 V +1 12/05/23, 13:56

  5. Oliver Klee voted on patch set 1 CR +1 12/05/23, 14:08

  6. Oliver Klee commented on patch set 1 CR 0 12/05/23, 14:10

    Would it make sense to backport this to 12.4 and 11.5 as well?
  7. Stefan Froemken commented on patch set 1 12/05/23, 14:15

    Reply

    I would really appreciate that, but I thought that this may break existing installations. Remember you have configured 240 seconds max_execution_time, the response would need 80 seconds and Guzzle stops the request because of the new 20 seconds property.
  8. Benni Mack commented on patch set 1 12/05/23, 14:28

    Reply

    I think 20 sec is a good default which is fine for me to backport to v12 as well
  9. Stefan Froemken updated the commit message in patch set 2 CR +1 V +1 12/05/23, 14:54

  10. Stefan Froemken commented on patch set 2 12/05/23, 14:55

    Reply

    OK. I have updated the releases :thumbup:
  11. core-ci voted on patch set 2 V +1 12/05/23, 15:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50380

  12. Oliver Klee voted on patch set 2 CR +1 12/05/23, 15:11

  13. Stefan Bürk voted on patch set 2 CR +1 V +1 12/05/23, 15:29

  14. HOJA M A voted on patch set 2 CR +1 12/05/23, 17:36

  15. HOJA M A voted on patch set 2 V +1 12/05/23, 17:36

  16. Georg Ringer voted on patch set 2 CR +2 V +2 12/05/23, 21:15

  17. Georg Ringer merged patch set 3 12/05/23, 21:15

  18. Oliver Hader commented on patch set 3 12/06/23, 08:15

    Post-review: It seems the original intention was to focus on web requests keep the timeout lower than PHP's `max_execution_time`. From my POV it would be totally fine to have a much longer timeout (or unlimited) when downloading large files in a CLI context (which probably has a different or unlimited `max_execution_time`). Thus, this change can be considered breaking. I think it's better to determine the `timeout` option value during runtime in `\TYPO3\CMS\Core\Http\RequestFactory` from `max_execution_time` (and e.g. use 80% of `max_execution_time` for the Guzzle `timeout`).
  19. Oliver Hader commented on patch set 3 12/06/23, 10:02

    This also has been discussed in Slack (https://typo3.slack.com/archives/C03AM9R17/p1701850585082239?thread_ts=1701810994.856119&cid=C03AM9R17). As it seems that this change might cause more harm than good, I'd opt for reverting it without any substitute.
  20. Oliver Hader wrote 12/06/23, 21:17

    Created a revert of this change as I601051b8d52c9064800075cd0f928f236373e9ef