Bug #102606
openUpdate Guzzle timeout to 20 seconds
100%
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
Updated by Gerrit Code Review 5 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
Updated by Gerrit Code Review 5 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
Updated by Gerrit Code Review 5 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
Updated by Stefan Froemken 5 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset f49f871bff426c2913b65eebcc087cf37769fd08.
Updated by Oliver Hader 5 months ago
- Related to Task #102610: Revert "[BUGFIX] Set HTTP timeout to 20 seconds" added
Updated by Gerrit Code Review 5 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