Project

General

Profile

Actions

Bug #67409

closed

Cannot change lock folder in FileLockStrategy

Added by Alexander Jahn over 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Performance
Target version:
-
Start date:
2015-06-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

The directory used by FileLockStrategy to write locks is hardcoded to "typo3temp/locks/".

Make lock folder configurable (like \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend) so locks can be written to other directories.

Actions #1

Updated by Alexander Jahn over 9 years ago

Some background information:

We are using TYPO3 in a clustered environment; typo3temp is shared between all servers using nfs.

FileLockStrategy is used when building ClassLoader cache, resulting in lots of files written/deleted over nfs. Lockfiles are deleted almost instantly after they are written, leading to severe performance problems (and total lock up) when rebuilding Classloader cache.

Actions #2

Updated by Markus Klein over 9 years ago

Maybe we find a way to make that configurable, but for your usecase it does not make sense.

The locking is in place to protect your shared information (aka cache), hence the lock must also be shared.
You basically have two options:
  1. change the locking to something that works globally on your cluster (filebased via NFS is a burden, but works)
  2. make the caches local to each server and do not share typo3temp via NFS

Moreover the whole class loader cache is gone with 7.3.

Besides that: The total lock up is essential to the functionality of the cache. It's the sole purpose of a lock to have a consistent view of data to all requests, and only 1 request may generate those cache data, all other have to wait until this is finished. (what shall they do without classes anyway)

Actions #3

Updated by Markus Klein almost 9 years ago

  • Status changed from New to Closed

Closing this for the time being. In case you wanna pick it up again, please request to reopen this issue on Slack or create a new issue referencing this one

Actions

Also available in: Atom PDF