Project

General

Profile

Actions

Bug #87174

open

.... typo3temp/var/cache/code/cache_core/site-configuration.php): Access is denied

Added by Eckard Gehrke over 5 years ago. Updated almost 2 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2018-12-16
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.2
Tags:
ddev, windows, xampp
Complexity:
Is Regression:
Sprint Focus:

Description

Hi,

after upgrade from 8.7.13 I am getting now this error very frequently in the log:

Core: Error handler (BE): PHP Warning: rename(C:/dev_95/typo3temp/var/cache/code/cache_core/5c16b9b2bd900101327003.temp,C:/dev_95/typo3temp/var/cache/code/cache_core/site-configuration.php): Access is denied. (code: 5) in C:\dev_95\typo3\sysext\core\Classes\Cache\Backend\SimpleFileBackend.php line 234

Looking to the files it seems to be just an empty php files:

[] #

No other "Access is denied" errors fopr other files appear.

Best regards
Eckard.


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #91768: Race condition while caching data using SimpleFileBackendNew2020-07-08

Actions
Actions #1

Updated by Riccardo De Contardi about 5 years ago

I get the same errors on a XAMPP environment (windows 10); my installation is TYPO3 9.5.3, completely fresh installation (nothing installed except system extensions and empty default page)

Actions #2

Updated by Eckard Gehrke about 5 years ago

  • Category deleted (Backend API)
  • PHP Version set to 7.3

Hi,
has anybody else the same problem and found a solution in the meantime?
It seems to be a windows problem.
When a file is locked it cannot be renamed:

\typo3\sysext\core\Classes\Cache\Backend\SimpleFileBackend.php line 237
I found a suggestion
(https://stackoverflow.com/questions/12894822/access-denied-error-on-rename-call-when-uploading-files-in-symfony)

try {
rename($temporaryCacheEntryPathAndFilename,$cacheEntryPathAndFilename);
} catch(\Exception $e) {
if (copy($temporaryCacheEntryPathAndFilename,$cacheEntryPathAndFilename)) {
unlink($temporaryCacheEntryPathAndFilename);
}
}

But that does not solve the issue here.

Best regards
Eckard.

Actions #3

Updated by Markus Dübbert almost 5 years ago

  • TYPO3 Version changed from 9 to 8
  • PHP Version changed from 7.3 to 7.1

I get the same error:

Core: Error handler (BE): PHP Warning: rename(/var/www/html/web/typo3temp/var/Cache/Data/flux/5d1587584590b881734967.temp,/var/www/html/web/typo3temp/var/Cache/Data/flux/flux_content_types): No such file or directory in /var/www/html/vendor/typo3/cms/typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php line 236

the error occured after deinstalling/installing an extension.
see also
https://forge.typo3.org/issues/84123
https://forge.typo3.org/issues/55099

local ddev installation on windows 10

is there a solution for this yet?

update:
the problem for me is:
https://github.com/docker/for-win/issues/525

Actions #4

Updated by Tymoteusz Motylewski over 4 years ago

for me on xampp with win 10
a workaround like

 $res = @rename($temporaryCacheEntryPathAndFilename, $cacheEntryPathAndFilename);
       if (!$res) {
           $e = copy($temporaryCacheEntryPathAndFilename, $cacheEntryPathAndFilename);
            unlink($temporaryCacheEntryPathAndFilename);

       }

worked.

see also https://github.com/doctrine/common/pull/874

Actions #5

Updated by Stephan Salzmann over 4 years ago

Markus Dübbert wrote:

local ddev installation on windows 10

If you start the docker-desktop with administrative priviliges the error disappears.

Actions #6

Updated by Riccardo De Contardi about 4 years ago

Tymoteusz Motylewski wrote:

for me on xampp with win 10
a workaround like
[...]
worked.

see also https://github.com/doctrine/common/pull/874

I tried to modify the file /typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php but the error seems still present (but it is not reported on the log (?) :/ )

Actions #7

Updated by Susanne Moog about 4 years ago

Additional info: on ddev environments you can get rid of the error with https://stackoverflow.com/questions/57554778/how-can-i-fix-the-caching-issue-in-typo3-and-ddev

Actions #8

Updated by Randy Fay about 4 years ago

It seems to me that the root of this is that TYPO3 uses a filesystem as if it were tmpfs (<projectroot>/var/cache) when that may well be a slow filesystem, as it is whenever it's mounted from anywhere, as with ddev. Is there a reason that TYPO3 doesn't have a configured cache directory that's actually tmpfs, for example just pointing it to /tmp ?

For ddev, it would be possible to work around this by automatically setting var/cache to be a tmpfs mount. But since the problem appears in many environments (mostly Windows it seems) it may be better to just move that cache to a more appropriate place?

Actions #9

Updated by Susanne Moog about 4 years ago

  • Category set to Caching
Actions #10

Updated by Michael Stucki over 3 years ago

Randy Fay wrote:

It seems to me that the root of this is that TYPO3 uses a filesystem as if it were tmpfs (<projectroot>/var/cache) when that may well be a slow filesystem, as it is whenever it's mounted from anywhere, as with ddev. Is there a reason that TYPO3 doesn't have a configured cache directory that's actually tmpfs, for example just pointing it to /tmp ?

For ddev, it would be possible to work around this by automatically setting var/cache to be a tmpfs mount. But since the problem appears in many environments (mostly Windows it seems) it may be better to just move that cache to a more appropriate place?

Good idea to offer a tmpfs cache! Unfortunately it looks like the cache directory can't be changed because the setter function setCacheDirectory() is never called in TYPO3 v10.
So the most simple way to do this is to mount a tmpfs filesystem on top of typo3temp/var/Cache/.

On a single-host site, the workaround using tmpfs would work. However, in a multi-host setup with a single database, the typo3temp folder should be the same on all hosts, therefore it needs to be shared using NFS, CephFS, etc.

Actions #11

Updated by Michael Stucki over 3 years ago

  • TYPO3 Version changed from 8 to 10
  • PHP Version changed from 7.1 to 7.2
Actions #12

Updated by Michael Stucki over 3 years ago

I was adding comments here because I ran into a very similar problem. However, just decided to move my comments into a separate issue #91768.

Actions #13

Updated by Michael Stucki over 3 years ago

  • Related to Bug #91768: Race condition while caching data using SimpleFileBackend added
Actions #14

Updated by Simon Schaufelberger almost 2 years ago

  • Tags set to ddev, windows, xampp
Actions

Also available in: Atom PDF