• I can’t use Query Monitor on local site. In admin i’m getting PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 266240 bytes) in HIDDEN-FULL-PATH/web/wp-content/plugins/query-monitor/classes/Backtrace.php on line 137

    OS: Zorin OS 17.3 x86_64
    Web server: nginx/1.26.3 (Valet Linux v2.3.11)
    PHP: 8.3
    DB: mysql Ver 15.1 Distrib 10.6.21-MariaDB
    Browser: Latest Chrome on Linux

    How I tested:
    Clean site install (WordPress 6.8).
    Removed all themes (except Twenty Twenty-Five) and plugins.
    Active theme is Twenty Twenty-Five (v 1.2).
    In wp-config.php set define( 'QM_ENABLE_CAPS_PANEL', true );
    Install Query Monitor.
    Trying activate Query Monitor. Getting PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 266240 bytes) in HIDDEN-FULL-PATH/web/wp-content/plugins/query-monitor/classes/Backtrace.php on line 137.
    Open front-end. Front-end is working without errors.
    Trying open back-end and getting PHP Fatal error.
    Renaming query-monitor folder to query-monitor-bcp and then back-end and front-end working again.
    In wp-config.php set define( 'QM_ENABLE_CAPS_PANEL', false );
    Renaming query-monitor-bcp folder to query-monitor and activating Query Monitor plugin. This time back-end and front-end working as expected. No errors.

    • This topic was modified 1 week, 6 days ago by aneimo. Reason: Made another error testing
Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m getting a similar issue:

    [02-May-2025 19:06:38 UTC] PHP Notice: ob_end_flush(): Failed to send buffer of zlib output compression (0) in [redacted]/public_html/wp-includes/functions.php on line 5471

    [02-May-2025 19:07:17 UTC] PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 20480 bytes) in [redacted]/public_html/wp-content/plugins/query-monitor/classes/Backtrace.php on line 137

    [02-May-2025 19:07:17 UTC] PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 65536 bytes) in [redacted]/public_html/wp-includes/class-wp-fatal-error-handler.php on line 43

    Thread Starter aneimo

    (@aneimo)

    My problem was solved when I set define( 'QM_ENABLE_CAPS_PANEL', false ) in wp-config.php Acording Query Monitor documentation: “The user capabilities panel is not enabled by default because it can cause performance issues on sites that perform a large number of user capability checks.”. But… Before WordPress 6.8, there were no problems on the same site even when define( 'QM_ENABLE_CAPS_PANEL', true ) was enabled. The error has only appeared since WordPress 6.8

    Chiming in here. My memory errors look like below. It takes my server down each time I enable QM.

    I also have define( 'QM_ENABLE_CAPS_PANEL', true ) in wp-config.php, but for a long time. This issue started with WP6.8.

    [05-May-2025 14:57:47 UTC] PHP Fatal error: Allowed memory size of 3221225472 bytes exhausted (tried to allocate 528384 bytes) in [redacted]/public_html/wp-content/plugins/query-monitor/classes/Backtrace.php on line 318

    [05-May-2025 14:57:47 UTC] PHP Fatal error: Allowed memory size of 3221225472 bytes exhausted (tried to allocate 20480 bytes) in [redacted]/public_html/wp-includes/capabilities.php on line 1306

    [05-May-2025 15:11:58 UTC] PHP Fatal error: Allowed memory size of 3221225472 bytes exhausted (tried to allocate 528384 bytes) in [redacted]/public_html/wp-content/plugins/query-monitor/classes/Backtrace.php on line 318

    [05-May-2025 15:11:58 UTC] PHP Fatal error: Allowed memory size of 3221225472 bytes exhausted (tried to allocate 20480 bytes) in [redacted]/public_html/wp-includes/capabilities.php on line 1289
    • This reply was modified 3 days, 9 hours ago by Remco.
    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    The short answer is that this is the reason the user capabilities panel is not enabled by default. Unfortunately it’s too easy for a site to perform a gigantic number of user capability checks, and Query Monitor can exhaust the available memory when it logs them.

    I’ll have a look to see what changed in WordPress 6.8 which might cause the further increase in memory usage, but I have some other higher priority tasks that I will probably need to address before that.

    Cheers!

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