Project

General

Profile

Actions

Bug #89928

closed

Memory usage issue on CLI, caused by InMemoryLogWriter (adminpanel)

Added by Armin Vieweg over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
AdminPanel
Target version:
-
Start date:
2019-12-12
Due date:
% Done:

100%

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

Description

I've registered a Symfony command in TYPO3 v9 to import products. After 1000 products I've experienced a memory usage of >500MB.

Thanks to XDebug, I've figured out what causes the memory leak: It's the \TYPO3\CMS\Adminpanel\Log\InMemoryLogWriter registred in adminpanel extension.

When I put this to my extension's ext_localconf.php:

if (PHP_SAPI === 'cli') {
    unset($GLOBALS['TYPO3_CONF_VARS']['LOG']['writerConfiguration'][\TYPO3\CMS\Core\Log\LogLevel::DEBUG]);
}

the memory usage during full import stays below 50M.


The full conversation can be seen here (including screenshots): https://typo3.slack.com/archives/C025BQLFA/p1576143741206100

Actions

Also available in: Atom PDF