On large menus the php serialize method in \libraries\src\Cache\Controller\OutputController.php function store() causes apache server to restart.
Even with cache disabled.
The complete menu object is serialized before a check is made if cache is enabled.
On large menu's (roughly +150 menuitems, probably more settings play a role) this causes my Xampp server to restart.
Check if cache is enabled before performance intensive actions, like serialize, are executed.
Build a menu of +150 items
Got to a page in the website where this menu is displayed using mod_menu module.
Menu is displayed.
Server keeps restarting and finally causes timeout
Troubleshooting and logging is difficult, because the server is restarting.
Firefox returns:
Secure Connection Failed
An error occurred during a connection to www.website.dev.
Error code: PR_CONNECT_RESET_ERROR
Xampp server PHP 8.1 and 7.4
Apache 2.4
memory_limit=512M and memory_limit=8192M
Joomla 4.2.5
Adding the cache check in function store(), before cache lock is checked and object is serialized (quick)fixes the issue.
public function store($data, $id, $group = null, $wrkarounds = true)
{
if(!$this->cache->getCaching()):
return false;
endif;
$locktest = $this->cache->lock($id, $group);
``
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
bug
|
I again can't replicate this and have run this with a lot bigger sites than 150 menu items. We also didn't get additional reports like this, so I fear that this is an issue in your setup and not a bug in Joomla. Thus closing this issue.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-04-02 11:43:08 |
Closed_By | ⇒ | Hackwar |
I can't add anything usefull right now, but just wanted to give you the feedback, that my site with ~1800 menu items works fine both on live systems and on xampp.