Bug #67409
closedCannot change lock folder in FileLockStrategy
0%
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.
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.
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:
- change the locking to something that works globally on your cluster (filebased via NFS is a burden, but works)
- 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)
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