Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • Key_WebdesignKey_Webdesign
    Participant

    Alright, I've tried the updated version you sent me.
    It looks like the performance is somewhat improved, but I still get these errors. Less. but they're still there.

    Key_WebdesignKey_Webdesign
    Participant

    MB Blocks editor causes heavy concurrent block-renderer requests → CloudLinux OOM kills → 503 “invalid JSON”

    We’re running into repeatable 503 errors in the WordPress block editor specifically on MB Blocks‑based custom blocks. Hosting is CloudLinux with strict per‑user memory cgroup limits. We believe the MB Blocks editor render flow is causing multiple heavy PHP processes in parallel, exceeding the cgroup limit and getting killed.

    Observed symptom in editor

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

    What we found (evidence)
    We instrumented logging for MB Blocks related requests and captured memory usage and duration. The worst offenders are the WordPress REST block renderer calls for MB Blocks:

    Example log entries (single requests):

    • POST /wp-json/wp/v2/block-renderer/meta-box/cb-hero → ~7.8s, ~182MB peak
    • POST /wp-json/wp/v2/block-renderer/meta-box/cb-kleurgroep → ~7.7s, ~180MB peak
    • POST /wp-json/wp/v2/block-renderer/meta-box/cb-productcard → ~3.4s, ~182MB peak

    We also see multiple block-renderer calls in parallel (same second), which means total memory easily exceeds our CloudLinux hard limit (e.g. 3–4 x 180MB). This matches OOM kills in kernel logs and yields 503 responses.

    Relevant plugin code paths

    • MB Blocks registers render_callback which gets executed via the WP REST block-renderer endpoint.
    • In MBBlocks\Loader::prepare_render_callback_data, each block render populates fields with mb_get_block_field() for all fields, which appears to be expensive.

    Files:

    • vendor/meta-box/mb-blocks/src/Block.php (render + render callback registration)
    • vendor/meta-box/mb-blocks/src/Loader.php (prepare_render_callback_data)

    Reproduction (high-level)

    1. Edit a post with multiple MB Blocks (8 blocks already trigger multiple 503s).
    2. Observe concurrent POST /wp/v2/block-renderer/meta-box/... calls during editor load/preview.
    3. With CloudLinux user memory limits, PHP processes are killed → 503 → invalid JSON in editor.

    Request
    Can you advise how to mitigate this (reduce parallel rendering, defer preview, cache block renders, etc.)?
    Or is there a known issue in MB Blocks editor rendering that can be optimized to avoid simultaneous heavy block-renderer requests?

    We can provide HAR files and request logs if needed.

    Thanks!

    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
    in reply to: Time field value resetting to zero #49641
    Key_WebdesignKey_Webdesign
    Participant

    Alright, but I do need the second value, since this is the playing time of a music album.
    How should I format this with Meta Box fields to make it work, then?

    in reply to: Error loading block: The response is not a valid JSON response. #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?

    in reply to: Metabox v3.3.0 crash my site #49294
    Key_WebdesignKey_Webdesign
    Participant

    Update: with Meta Box AIO 3.3.1, the issue seems to be fixed!

    in reply to: Metabox v3.3.0 crash my site #49293
    Key_WebdesignKey_Webdesign
    Participant

    I'm pretty sure it has to do with the combination of Meta Box MB Blocks and WPML. This is the stack trace I got:

    [06-Nov-2025 15:23:49 UTC] PHP Fatal error:  Uncaught TypeError: MetaBox\Integrations\WPML::get_translated_value(): Argument #2 ($field) must be of type array, false given, called in *path*/public_html/wp-includes/class-wp-hook.php on line 326 and defined in *path*/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box/src/Integrations/WPML.php:110
    Stack trace:
    #0 *path*/public_html/wp-includes/class-wp-hook.php(326): MetaBox\Integrations\WPML->get_translated_value()
    #1 *path*/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #2 *path*/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box/inc/functions.php(162): apply_filters()
    #3 *path*/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-blocks/src/functions.php(6): rwmb_get_value()
    #4 *path*/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-blocks/src/Loader.php(119): mb_get_block_field()
    #5 *path*/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-blocks/src/Loader.php(92): MBBlocks\Loader::prepare_render_callback_data()
    #6 *path*/public_html/wp-includes/class-wp-block.php(586): MBBlocks\Loader->MBBlocks\{closure}()
    #7 *path*/public_html/wp-includes/blocks.php(2359): WP_Block->render()
    #8 *path*/public_html/wp-includes/blocks.php(2431): render_block()
    #9 *path*/public_html/wp-includes/class-wp-hook.php(324): do_blocks()
    #10 *path*/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #11 *path*/public_html/wp-includes/post-template.php(256): apply_filters()
    #12 *path*/public_html/wp-content/themes/giethoornvillage/page.php(16): the_content()
    #13 *path*/public_html/wp-includes/template-loader.php(106): include('*homepath*/d...')
    #14 *path*/public_html/wp-blog-header.php(19): require_once('*homepath*/d...')
    #15 *path*/public_html/index.php(17): require('*homepath*/d...')
    in reply to: Version 5.10.16 – 2025-11-05 not working with WPML sites #49289
    Key_WebdesignKey_Webdesign
    Participant

    Yes, I got the same problem and error with Meta Box AIO.
    I just went back to a previous version because of this.

    in reply to: Icon meta box not updating when changing json #49242
    Key_WebdesignKey_Webdesign
    Participant

    Hi there,
    It might have something to do with the Redis Object Cache. I manually flushed the cache and now the svg icons have been renewed.
    Good to know for other Redis users!

    in reply to: Issue with wordpress 6.8 #48235
    Key_WebdesignKey_Webdesign
    Participant

    Would be great if the WPML issue would be addressed. It has not been working properly for quite some time now, and some of my client websites are having issues.
    It's been over a month now...

    in reply to: Issue with wordpress 6.8 #48140
    Key_WebdesignKey_Webdesign
    Participant

    Will the WPML issue be addressed?
    I still have a few production sites that cannot be translated properly due to this issue.

    in reply to: Issue with wordpress 6.8 #48104
    Key_WebdesignKey_Webdesign
    Participant

    Well, at least it's working, now.
    The only thing that is not working still, are the WPML translations. Everything in the data of the MB Block is not showing up in the translation editor of WPML. This used to work fine.

    in reply to: Issue with wordpress 6.8 #48086
    Key_WebdesignKey_Webdesign
    Participant

    Having the same issue. All blocks are registered using the json method.
    I have about 12 client sites that are broken because of this...

    in reply to: Unnecessary code on every page #43001
    Key_WebdesignKey_Webdesign
    Participant

    I'm experiencing the same issue on dozens of websites with Meta Box AIO installed. The Front End Submission is turned off everywhere.

    Key_WebdesignKey_Webdesign
    Participant

    Following up, what about dynamically rendered javascript?
    For example, I want to make a slider block and this slider needs to be initialized. Depending on the Block settings, different javascript should be generated. Now, I can add inline javascript beneath the rendered block HTML but this doesn't fire, as Nicholas already pointed out.
    Any ideas?

Viewing 15 posts - 1 through 15 (of 20 total)