Project

General

Profile

Actions

Bug #102606

closed

Update Guzzle timeout to 20 seconds

Added by Stefan Froemken 12 months ago. Updated 6 months 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

Also available in: Atom PDF