Page 1 of 1

Joomla resetting PHP opCache with phar packages

Posted: Mon Dec 26, 2022 2:39 pm
by fatica
Hi,

After updating to 3.9.10, we noticed greatly increased CPU utilization in our application. After a lot of investigation, we found that including a PHP Phar package caused the PHP opcache to get reset on every request.

Since that phar package (for geoip) was included in pretty much every request, the opcache was getting constantly reset.

We narrowed it down to this call:
\TYPO3\PharStreamWrapper\Helper::resetOpCache

in /libraries/vendor/typo3/phar-stream-wrapper/src/PharStreamWrapper.php

That logic was triggered by this call in our application.
require 'geoip2.phar';

Changing the phar include over to a composer require solved the problem, but the resetOpCache in Typeo3 is deadly.

Ref:
https://www.drupal.org/project/drupal/issues/3291830

Re: Joomla resetting PHP opCache with phar packages

Posted: Mon Dec 26, 2022 4:12 pm
by Per Yngve Berg
Why do you upgrade to an old release? Current is 3.10.11

Re: Joomla resetting PHP opCache with phar packages

Posted: Mon Dec 26, 2022 7:10 pm
by fatica
I actually meant 3.10.11