Project

General

Profile

Actions

Bug #55294

closed

Under heavy load, two request can simultaneously write to same cache file - should use locking

Added by Jan-Erik Revsbech about 10 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Caching
Target version:
-
Start date:
2014-01-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
hard
Is Regression:
No
Sprint Focus:

Description

On sites with rather high load, we have witnessed a rare problem, where two request is apparently writing to the same cache file at the same time. This happens if the cache is cleared, and two requests both try to populate the cache_core cache, which is i SimpleFileBackend cache.

In some cases the file might be a file that is only needed by an extensions, and pages using that will fail, in some cases the file might be one that is also used by the backend, which means the backend is effectively broken, and its not possible to clear cache (other that manually deleteing the typo3temp/Cache/Code directory).

The problem is much worse on a slow filesystem, and I believe that it is due to SimpleFileBackend nt using a filelock before writing the file.

The fix should be very easy. Simply either issue a flock directly in SimpelFileBackend, og use TYPO3 locking mechanism.


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #55099: PHP Warnings after clearing configuration cache in BEClosed2014-01-17

Actions
Related to TYPO3 Core - Feature #47712: Refactor LockingClosedMarkus Klein2013-02-08

Actions
Has duplicate TYPO3 Core - Bug #63135: Need a stopgap fix for SimpleFileBackend cache lockingClosedBenni Mack2014-01-24

Actions
Actions

Also available in: Atom PDF