Issue Bug Closed

#107168AdminPanel EventDispatcher consumes unnecessary RAM during CLI calls

Daniel Siepmann 07/30/25, 05:28 updated 07/30/25, 14:09

Description

Our concrete use case:

We want to execute the referenceindex:update on an installation with millions of records.
We also want to have the EXT:adminpanel installed in our installation for all the nice benefits in frontend.

The issue:

The command consumes way too much RAM, more than 4 GiB.
This can be seen by adding -vvv.

The root cause:

The TYPO3\CMS\Adminpanel\Service\EventDispatcher will collect all dispatched events, preventing the instances of those events from cleaned up by PHP Garbarge Collection.

This can be debugged via https://github.com/juchi/php-meminfo which clearly states that there a lot of instances of events, hold by this service.

Solutions:

We for now comment out the corresponding code within the class, as we don’t need this information for debugging in frontend in our installation.

But that’s not a proper solution. Maybe the service can check the context and only collect events in frontend? I guess there is no way to use the collected information in TYPO3 backend yet. But we could also check for CLI context and prevent collection only in CLI context.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.