No Code Attached Yet bug
avatar keewhip
keewhip
9 Dec 2022

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.

Steps to reproduce the issue

Build a menu of +150 items
Got to a page in the website where this menu is displayed using mod_menu module.

Expected result

Menu is displayed.

Actual result

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

System information (as much as possible)

Xampp server PHP 8.1 and 7.4
Apache 2.4
memory_limit=512M and memory_limit=8192M
Joomla 4.2.5

Additional information

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);
``
avatar keewhip keewhip - open - 9 Dec 2022
avatar keewhip keewhip - change - 9 Dec 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 9 Dec 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 9 Dec 2022
avatar Hackwar Hackwar - change - 22 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 22 Feb 2023
avatar Hackwar
Hackwar - comment - 25 Aug 2023

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.

avatar Hackwar Hackwar - close - 2 Apr 2024
avatar Hackwar
Hackwar - comment - 2 Apr 2024

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.

avatar Hackwar Hackwar - change - 2 Apr 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-04-02 11:43:08
Closed_By Hackwar

Add a Comment

Login with GitHub to post a comment