Site logo

[Support request] Generateblocks causing Error 500?!

Home Forums Support [Support request] Generateblocks causing Error 500?!

Home Forums Support Generateblocks causing Error 500?!

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1708357
    Mireia

    Hello,

    We use Generatepress pro + Generate Blocks on our website and yesterday we had a serious problem, the website stopped loading completely (error 500):

    [23-Mar-2021 19:38:15 UTC] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) in /home/mireiado/misterio.studio/wp-includes/class-wp-block-parser.php on line 445

    The technical service of our hosting informed us that there was a loading problem, they recommended us to change the version of PHP and the memory-limit, but it did not work.

    Today, after a more in-depth review, they told us the following:

    “We see that this problem occurs when generatingblocks is enabled, if it is deactivated, the web loads normally. We have verified if it would be an incompatibility with any of the other elements or with the WordPress version, but it is not.
    Installing an old version of the plugin doesn’t seem to work properly either. ”

    Our entire website is built with generateblocks so it’s quite a dramatic matter right now.

    According to them there is no incompatibility, so we do not understand what is happening and we wonder if you can help us. Do you have any idea why it doesn’t work? Do you know another similar recent case?

    Thanks a lot!

    #1708362
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    We had something similar mentioned here: https://generatepress.com/forums/topic/generateblocks-causing-memory-leak-and/

    However, it didn’t end up being GenerateBlocks.

    The problem with saying “We deactivated GenerateBlocks and the problem went away” is that GenerateBlocks does indeed take up some memory (everything does). If a server is already close to capacity, it’s definitely possible that GenerateBlocks (or any plugin) can push it over the edge. Then, of course, if the plugin is deactivated, it “fixes” the issue.

    If your hosting does indeed think GenerateBlocks is the culprit, we would need some actual error logs/data pinpointing the issue. There are a handful of tools that most servers have at their disposal that allow for this sort of debugging.

    Let us know 🙂

    #1708376
    Mireia

    Thank you very much Tom for your quick reply. We have just asked the hosting for more details, we will let you know their answer.

    On the other hand, in the topic you shared, we see that the problem was a reusable block. We have quite a few and we notice that when we edit a page with this type of blocks it goes especially slow. Also, from time to time the page never fully loads or gives us a JSON error. Can everything be related in some way?

    #1709095
    Mireia

    Hi again,

    My hosting is asking for the minimum requirements of GenerateBlocks. On your page I find this information but I would like to know if you could give any more:

    WordPress Version:5.4 or higher
    Tested up to:5.7
    PHP Version:5.6 or higher

    For now they do not find a reason for the error and they have not been able to give me more details.

    Thanks

    #1709123
    David
    Staff
    Customer Support

    Hi there,

    the simplest test would be for the host to increase the available PHP Memory.
    The requirements will be dependent on your entire site, not a single plugin.
    Here’s an example of my minimum specification server setup:

    PHP version 7.4
    PHP max input variables 4000
    PHP time limit 1200
    PHP memory limit 256M
    Max input time 600
    Upload max filesize 300M
    PHP post max size 1000M

    In regards to PHP memory limit i generally push this up to 768M on heavier live sites.

    #1709142
    Mireia

    Finally, we have found the problem. It turns out that a reusable block made with the GenerateBlocks button was created incorrectly. It was referencing itself, looping, and finally causing the web to crash if the plugin was active.

    I hope this contribution is helpful in case it happens to someone else. Thank you very much Tom and David for your help!

    #1709875
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Glad you found the issue!

    Was there an error associated with that infinite loop that you can share? Perhaps inside the error_log file? It may help us see if it’s an issue with the Button block itself or a random issue with Reusable blocks (which just got a major update in WP 5.7).

    #1710544
    Mireia

    Hi Tom,

    Yesterday I created a new reusable block with native WP button instead of Generateblocks and… surprise! Web crashed again. So all seems to indicate this is a reusable block issue.

    Everything was working until I started using it on specific pages (portfolio). I don’t know if the trigger is the type of page or using it in too many pages (more than 10).

    #1711087
    Tom
    Lead Developer
    Lead Developer

    Are there any errors in your error_log? Good to know it’s not GenerateBlocks specific, but I am curious as to what’s going on.

    #2454156
    Nicolaas

    I am having the same issue with reusable blocks. I am a happy user of GeneratePress/GenerateBlocks.

    In this case a fat error happened AFTER I converted a block back into a regular block.

    Here a link to a testpage with the reusable (so not yet back-converted) block: https://blueskynomad.com/playbook/

    Mem limit is 768M

    I see nothing in error logs of Siteground. I added plugin (WP memory) and got the following:

    Date: [08-Dec-2022 07:31:00 UTC]
    Type: PHP Fatal error
    Message: Allowed memory size of 805306368 bytes exhausted (tried to allocate 20480 bytes)
    In: /home/customer/www/blueskynomad.com/public_html/wp-includes/class-wp-block-parser.php on line 461

    Date: [08-Dec-2022 07:27:56 UTC]
    Type: PHP Fatal error
    Message: Allowed memory size of 805306368 bytes exhausted (tried to allocate 20480 bytes)
    In: /home/customer/www/blueskynomad.com/public_html/wp-includes/class-wp-block-parser.php on line 417

    Date: [08-Dec-2022 07:25:28 UTC]
    Type: PHP Fatal error
    Message: Allowed memory size of 805306368 bytes exhausted (tried to allocate 20480 bytes)
    In: /home/customer/www/blueskynomad.com/public_html/wp-includes/class-wp-block-parser.php on line 516

    I hope you can help!

    And indeed the reusable blocks often slow down at least the admin side of the site.

    Cheers,

    Nicolaas

    #2454327
    Nicolaas

    #2454156: Found it I think. It is either the Simple TOC plugin that doesn’t like GenerateBlocks. May have also been a wrong set-up of the reusable table (when switching off SimpleTOC I saw a message like that block cannot render or be displayed in itself).Not sure what I did wrong.

    #2454328
    David
    Staff
    Customer Support

    Hi there,

    what is inside the Reusable block ? Is it just static content or is there anything that would display dynamic content ?

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.