Error loading block: The response is not a valid JSON response.

Support MB Blocks Error loading block: The response is not a valid JSON response.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #49559
    Key_WebdesignKey_Webdesign
    Participant

    With multiple websites I'm getting the error notice "Error loading block: The response is not a valid JSON response.", when editing a page where I use MB Blocks custom blocks.
    This behaviour seems to be unstable, since it's not consistent what blocks give the error. Sometimes I get no errors, sometimes I get 12 errors out of the 24 custom blocks in the page.

    What could be causing this?

    #49565
    PeterPeter
    Moderator

    Hello,

    I suggest removing blocks one by one to identify the cause of the issue. Then share the block field group with me, I will help you investigate the issue.

    Or maybe it could be affected by a third-party plugin or custom code on your site, you can try to deactivate all plugins except Meta Box plugins, switch to a WordPress theme and recheck the issue.

    #49568
    Key_WebdesignKey_Webdesign
    Participant

    Well, the thing is, the problem does not always occur. Also, not always on the same blocks... This makes it very hard to investigate, of course.
    It seems to me it has something to do with the block-renderer, when you have several (more than 5) custom MB blocks in a page. The more custom MB blocks there are in a page, the higher the chance that one or more blocks will have this error. Sometime when I reload other blocks have the issue, sometimes all the errors are gone.

    I've seen this behaviour in multiple websites where I integrate custom blocks into a custom-made theme, using the MB Blocks extension of Meta Box.

    Do you have any other ideas than the ones you proposed?

    #49571
    PeterPeter
    Moderator

    Hello,

    Please share your site admin account by submitting this contact form https://metabox.io/contact/
    I will take a look.

    Thank you.

    #49709
    Key_WebdesignKey_Webdesign
    Participant

    Looks like it's a memory thing. Still, this indicates that the block renderer uses too much memory in the proces. I'm constantly reaching the limit of 1 GB, which should be more than sufficient.
    Here some lines from the error log:

    [Fri Jan 30 16:08:55 2026] Memory cgroup stats for /lve2428:
    [Fri Jan 30 16:08:55 2026] oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=/,mems_allowed=0,oom_memcg=/lve2428,task_memcg=/lve2428,task=lsphp,pid=3954594,uid=2428
    [Fri Jan 30 16:08:55 2026] Memory cgroup out of memory: Killed process 3954594 (lsphp) total-vm:744688kB, anon-rss:80104kB, file-rss:15232kB, shmem-rss:4kB, UID:2428 pgtables:860kB oom_score_adj:0
    #49712
    PeterPeter
    Moderator

    Hello,

    The issue might come from the callback function or template of the custom block. The code will run a loop, and somehow it becomes an infinite loop causing an out-of-memory issue.

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