Project

General

Profile

Actions

Bug #91768

open

Race condition while caching data using SimpleFileBackend

Added by Michael Stucki over 3 years ago. Updated 2 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2020-07-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When two requests run at the same time:
- request A clears a cache (e.g. cache_core)
- request B tries to write into the same cache

In this situation, request B may fail because the parent folder is gone:

[06-Jul-2020 17:54:02] WARNING: [pool www] child 4978 said into stderr: "NOTICE: PHP message: https://example.host/ - core: Core: Error handler (FE): PHP Warning: file_put_contents(/var/www/html/html/typo3temp/var/Cache/Data/l10n/5f03491aac1d8038441429.temp): failed to open stream: No such file or directory in /var/www/html/vendor/typo3/cms/typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php line 236" 
[06-Jul-2020 17:54:02] WARNING: [pool www] child 4978 said into stderr: "NOTICE: PHP message: https://example.host/ - Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1334756737: The temporary cache file "/var/www/html/html/typo3temp/var/Cache/Data/l10n/5f03491aac1d8038441429.temp" could not be written. | TYPO3\CMS\Core\Cache\Exception thrown in file /var/www/html/vendor/typo3/cms/typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php in line 239. Requested URL: https://example.host/home/" 

This seems to happen more often on non-local filesystems because they are slower. However, it could also happen when using a local temp folder.


Files


Related issues 4 (2 open2 closed)

Related to TYPO3 Core - Bug #87174: .... typo3temp/var/cache/code/cache_core/site-configuration.php): Access is deniedNew2018-12-16

Actions
Related to TYPO3 Core - Task #88927: The temporary cache file ... could not be writtenClosed2019-08-06

Actions
Related to TYPO3 Core - Bug #99821: cache:warmup always recreates core code cache files even if they exist and the content will not changeRejected2023-02-04

Actions
Related to TYPO3 Core - Bug #100123: Regular exceptions due to dependency injection (di) cacheNew2023-03-09

Actions
Actions

Also available in: Atom PDF