Bug #46205

Cache file could not be written on concurrent actions

Added by Oliver Hader over 6 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Caching
Target version:
Start date:
2013-03-12
Due date:
% Done:

100%

TYPO3 Version:
6.0
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I get several errors like

The cache file "htdocs/typo3temp/Cache/Data/t3lib_l10n/3e2cbbda0301cf592e5831ef26c56b7b" could not be written.

This happens while a scheduler process is running that imports data using t3lib_TCEmain/DataHandler an I'm trying to work in the backend.
I consider this kind of a race condition that e.g. in this case language caches are flushed too often if a new record gets persisted in the DataHandler.

I can reproduce this on my local machine (Mac OS X) and a staging server with Ubuntu 12.04.


Related issues

Related to TYPO3 Core - Bug #33622: Filebackend reports error when trying to rename file due to concurrent processes New 2012-02-02
Related to TYPO3 Core - Bug #47912: Improvment of LanguageCacheClearer Closed 2013-05-04
Related to TYPO3 Core - Bug #39122: Invalid chmod by default for folder typo3temp/Cache/Data/t3lib_l10n/ Closed 2012-07-20
Related to TYPO3 Core - Bug #64110: Cache file could not be written Closed 2015-01-04
Duplicated by TYPO3 Core - Bug #44539: t3lib_cacheExceptions thrown when writing concurrently to db Closed 2013-01-15

Associated revisions

Revision 4e4ad0a4 (diff)
Added by Oliver Hader over 6 years ago

[BUGFIX] Cache file could not be written on concurrent actions

The hook to clear the language (l10n) caches is currently called
every time any element in the backend is modified. If concurrent
actions take place, flushing and regenerating this cache results
in an accordant exception like

The cache file ".../t3lib_l10n/3e2cbbda0301cf592e5831ef26c56b7b"
could not be written.

The solution is to only execute this hook if all or the temp.
caches shall be cleared

Change-Id: Iaf68f50e2f9bfcc3ffce64a0f5267673afd332ad
Fixes: #46205
Releases: 4.7, 6.0, 6.1
Reviewed-on: https://review.typo3.org/19898
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer

Revision 3439e954 (diff)
Added by Oliver Hader over 6 years ago

[BUGFIX] Cache file could not be written on concurrent actions

The hook to clear the language (l10n) caches is currently called
every time any element in the backend is modified. If concurrent
actions take place, flushing and regenerating this cache results
in an accordant exception like

The cache file ".../t3lib_l10n/3e2cbbda0301cf592e5831ef26c56b7b"
could not be written.

The solution is to only execute this hook if all or the temp.
caches shall be cleared

Change-Id: Iaf68f50e2f9bfcc3ffce64a0f5267673afd332ad
Fixes: #46205
Releases: 4.7, 6.0, 6.1
Reviewed-on: https://review.typo3.org/19898
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-on: https://review.typo3.org/19903
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader

Revision dc3a4e80 (diff)
Added by Oliver Hader over 6 years ago

[BUGFIX] Language cache is not cleared anymore

The language cache is not cleared anymore due to
wrong condition in the hook method.

Change-Id: If549d57580d05a547f8c879eed31a1f72667c661
Related: #46205
Releases: 6.0, 6.1
Reviewed-on: https://review.typo3.org/19910
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader

Revision 8b7ff015 (diff)
Added by Oliver Hader over 6 years ago

[BUGFIX] Language cache is not cleared anymore

The language cache is not cleared anymore due to
wrong condition in the hook method.

Change-Id: If549d57580d05a547f8c879eed31a1f72667c661
Related: #46205
Releases: 6.0, 6.1
Reviewed-on: https://review.typo3.org/19909
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader

Revision 712e7ae6 (diff)
Added by Oliver Hader over 6 years ago

[BUGFIX] Cache file could not be written on concurrent actions

The hook to clear the language (l10n) caches is currently called
every time any element in the backend is modified. If concurrent
actions take place, flushing and regenerating this cache results
in an accordant exception like

The cache file ".../t3lib_l10n/3e2cbbda0301cf592e5831ef26c56b7b"
could not be written.

The solution is to only execute this hook if all or the temp.
caches shall be cleared

Change-Id: Iaf68f50e2f9bfcc3ffce64a0f5267673afd332ad
Fixes: #46205
Releases: 4.7, 6.0, 6.1
Reviewed-on: https://review.typo3.org/19904
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer

History

#1 Updated by Ernesto Baschny over 6 years ago

  • Status changed from New to Needs Feedback

Olly, isn't that a permission problem where your Scheduler cronjob is running as a different user as your webserver?

#2 Updated by Oliver Hader over 6 years ago

  • Subject changed from Cache file could not be written on scheduler process to Cache file could not be written on concurrent actions

#3 Updated by Gerrit Code Review over 6 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19898

#4 Updated by Gerrit Code Review over 6 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/19903

#5 Updated by Gerrit Code Review over 6 years ago

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/19904

#6 Updated by Oliver Hader over 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#7 Updated by Gerrit Code Review over 6 years ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/19904

#8 Updated by Gerrit Code Review over 6 years ago

Patch set 3 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/19904

#9 Updated by Oliver Hader over 6 years ago

  • Status changed from Under Review to Resolved

#10 Updated by Riccardo De Contardi almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF