Project

General

Profile

Actions

Bug #102606

closed

Update Guzzle timeout to 20 seconds

Added by Stefan Froemken 7 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Must have
Category:
System/Bootstrap/Configuration
Target version:
Start date:
2023-12-05
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
13
PHP Version:
8.3
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

Description

Hello,

I have a scheduler task which requests an API every 15 minutes. As I use TYPO3 RequestFactory the integrated Guzzle client will get its config from TYPO3_CONF_VARS/HTTP. As default in Guzzle options https://docs.guzzlephp.org/en/stable/request-options.html#timeout the property "timeout" is set to 0. The same value is default in TYPO3 as configured in DefaultConfiguration.php.

As TYPO3 is PHP based and works in a web environment we have to respect PHP:max_execution_time which is somewhere between 30 and 240 seconds. With "timeout" 0 (infinite) an outgint request which exceeds max_execution_time will stop the TYPO3 request immediatly. In case of a scheduler task you will see that task is still running which is not the case. The problem is: In that state the task will not be executed again until an integrator reset the task.

For me a default of 0 is a very bad idea.
I prefer setting that value to 20 seconds. If that value has been reached Guzzle will throw an exception which can be catched and the scheduler task can be resetted to a clean state.

Stefan


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #102610: Revert "[BUGFIX] Set HTTP timeout to 20 seconds"Closed2023-12-06

Actions
Actions #1

Updated by Gerrit Code Review 7 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82091

Actions #2

Updated by Gerrit Code Review 7 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82091

Actions #3

Updated by Gerrit Code Review 7 months ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82025

Actions #4

Updated by Stefan Froemken 7 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Oliver Hader 7 months ago

  • Related to Task #102610: Revert "[BUGFIX] Set HTTP timeout to 20 seconds" added
Actions #6

Updated by Gerrit Code Review 7 months ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82135

Actions #7

Updated by Georg Ringer about 1 month ago

  • Status changed from Under Review to Needs Feedback

I am not sure if we should close the issue as the change has been abandoned

The change for issue #102606 has the potential to do more harm
than good. The initial intention was to define a HTTP timeout to
be lower than the PHP `max_execution_time`. Defining general
HTTP `timeout` of 20 seconds now also limits e.g. long running
CLI processes - which can be considered a breaking change.

Actions #8

Updated by Georg Ringer about 1 month ago

  • Status changed from Needs Feedback to Closed

closing confirmed via slack

Actions

Also available in: Atom PDF