• Resolved Mohamed

    (@atta98)


    Hi Ollie team,

    We are seeing a severe memory exhaustion issue when using the Ollie Menu Designer plugin, specifically with the Mega Menu / dropdown block inside a WordPress Navigation block.

    The issue appears to be caused by recursive block rendering, where the mega menu render file calls a block template part, which then renders navigation blocks again, eventually looping until PHP memory is exhausted.

    Environment:

    • Plugin: Ollie Menu Designer Version 0.3.0
    • Server: Nginx + PHP-FPM
    • PHP memory limit: 800 MB / 838860800 bytes
    • Issue occurs in both editor/frontend depending on the menu setup
    • Browser used during testing: Chrome on macOS

    What happened:

    • After enabling and heavily using Ollie Menu Designer, especially dropdown/mega menu blocks inside navigation, the editor stopped loading.
    • The frontend also started returning 502 errors.
    • Disabling the Ollie Menu Designer plugin immediately restored the site.
    • Increasing PHP memory is not a proper fix because the script is already exhausting around 800 MB.

    Example PHP fatal errors:

    PHP Fatal error: Allowed memory size of 838860800 bytes exhausted (tried to allocate 20480 bytes) in /wp-includes/block-template-utils.php on line 230
    PHP Fatal error: Allowed memory size of 838860800 bytes exhausted (tried to allocate 20480 bytes) in /wp-includes/block-template-utils.php on line 212
    PHP Fatal error: Allowed memory size of 838860800 bytes exhausted (tried to allocate 20480 bytes) in /wp-includes/blocks.php on line 1699

    Relevant plugin file from the stack trace: /wp-content/plugins/ollie-menu-designer/build/blocks/mega-menu/render.php

    render()
    render_block()
    do_blocks()
    block_template_part()
    /wp-content/plugins/ollie-menu-designer/build/blocks/mega-menu/render.php:146
    render()
    render_block()
    do_blocks()
    block_template_part()
    /wp-content/plugins/ollie-menu-designer/build/blocks/mega-menu/render.php:146

    Could you please check the rendering logic in: build/blocks/mega-menu/render.php especially around line 146 where block_template_part() appears in the stack trace? It may need a recursion guard, depth limit, or validation to prevent a mega menu block from rendering a template/navigation structure that contains itself again. Please let me know if you need any more logs, plugin version details, screenshots, or access to a reproduction setup.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.