Joomla resetting PHP opCache with phar packages

Discussion regarding Joomla! 3.x Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
User avatar
fatica
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 153
Joined: Fri Jan 19, 2007 10:32 pm
Contact:

Joomla resetting PHP opCache with phar packages

Post by fatica » Mon Dec 26, 2022 2:39 pm

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
You do not have the required permissions to view the files attached to this post.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30940
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Joomla resetting PHP opCache with phar packages

Post by Per Yngve Berg » Mon Dec 26, 2022 4:12 pm

Why do you upgrade to an old release? Current is 3.10.11

User avatar
fatica
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 153
Joined: Fri Jan 19, 2007 10:32 pm
Contact:

Re: Joomla resetting PHP opCache with phar packages

Post by fatica » Mon Dec 26, 2022 7:10 pm

I actually meant 3.10.11


Locked

Return to “Performance - Joomla! 3.x”