Project

General

Profile

Actions

Bug #90518

closed

DB problems with rootline cache: DELETE cf_cache_rootline double-JOIN with cf_cache_rootline_tags take excessively long

Added by Sybille Peters about 4 years ago. Updated 5 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2020-02-24
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Recently we are experiencing increasing number of exceptions and "too many connections" on TYPO3 9.5.13 in combination with DELETE queries on cf_cache_rootline and cf_cache_rootline_tags that take excessively long.

Obviously, this is causing massive problems.

Findings:

  • Increasing number of exceptions: An exception occurred while executing 'INSERT INTO `cf_cache_rootline ... Lock wait timeout exceeded; try restarting transaction | Doctrine\DBAL\Exception

This seems to be correlated with excessively long DELETE queries on cf_cache_rootline and cf_cache_rootline_tags with 2 JOINs.

# Time: 200221 11:44:21
# User@Host: ------ @  [------]
# Thread_id: 13694456  Schema: -----  QC_hit: No
# Query_time: *2212.109482*  Lock_time: 0.000340  Rows_sent: 0  Rows_examined: *1007307838*
# Rows_affected: *94732*
SET timestamp=1582281861;
DELETE tags2, cache1 FROM cf_cache_rootline_tags AS tags1 JOIN cf_cache_rootline_tags AS tags2 ON tags1.identifier = tags2.identifier JOIN cf_cache_rootline AS cache1 ON tags1.identifier = cache1.identifier WHERE tags1.tag IN ('pageId_3');

(I blanked out some IP addresses etc.)

in Typo3DatabaseBackend::flushByTags()


Files

mysql_processlist.txt (56.7 KB) mysql_processlist.txt show processlist (on DB) Sybille Peters, 2020-03-03 13:28
stacktrace.txt (10.7 KB) stacktrace.txt stacktrace Sybille Peters, 2020-03-03 13:35

Related issues 2 (1 open1 closed)

Related to TYPO3 Core - Bug #98617: Deadlock Error on Cache-Rootline Tags in Typo3 DatabaseBackend.phpClosed2022-10-14

Actions
Related to TYPO3 Core - Epic #93547: Collection of problems with large sitesAccepted2021-02-19

Actions
Actions

Also available in: Atom PDF