• Resolved Michael Kupietz

    (@mkupietz)


    Soon after installing this plugin, my server went down, reporting 523 timeouts for about 30 minutes.

    I had been debugging a low-level caching function that is called frequently, and generated >20MB debug logs in a matter of minutes.

    When I disabled the plugin by renaming the plugin folder via FTP, suddenly my site worked again. I re-enabled and disabled the plugin a few times in this manner. It reliably made my site timeout when it was enabled. I deleted the 20MB debug.log, and then everything was suddenly fine, even with the plugin enabled.

    With a few more tests, the debug.log ballooned to over 20MB again, and the site started timing out again. Disabling the plugin or deleting the debug.log file fixed it.

    My php-fpm slow log is full of entries like these from around that time:

    [05-Sep-2025 19:16:03] [pool 17002707405366737] pid 950258
    script_filename = /path/to/WordPress/wp-admin/tools.php
    [0x00007f45e8c149b0] str_replace() /path/to/WordPress/wp-content/plugins/debug-log-manager/classes/class-debug-log.php:1202
    [0x00007f45e8c146c0] get_processed_entries() /path/to/WordPress/wp-content/plugins/debug-log-manager/classes/class-debug-log.php:1521
    [0x00007f45e8c14580] get_entries_datatable() /path/to/WordPress/wp-content/plugins/debug-log-manager/bootstrap.php:266
    [0x00007f45e8c144d0] create_main_page() /path/to/WordPress/wp-includes/class-wp-hook.php:324
    [0x00007f45e8c143f0] apply_filters() /path/to/WordPress/wp-includes/class-wp-hook.php:348
    [0x00007f45e8c14380] do_action() /path/to/WordPress/wp-includes/plugin.php:517
    [0x00007f45e8c142a0] do_action() /path/to/WordPress/wp-admin/admin.php:260

    [05-Sep-2025 19:18:17] [pool 17002707405366737] pid 950761
    script_filename = /path/to/WordPress/wp-admin/tools.php
    [0x00007f45e8c149b0] str_replace() /path/to/WordPress/wp-content/plugins/debug-log-manager/classes/class-debug-log.php:1202
    [0x00007f45e8c146c0] get_processed_entries() /path/to/WordPress/wp-content/plugins/debug-log-manager/classes/class-debug-log.php:1521
    [0x00007f45e8c14580] get_entries_datatable() /path/to/WordPress/wp-content/plugins/debug-log-manager/bootstrap.php:266
    [0x00007f45e8c144d0] create_main_page() /path/to/WordPress/wp-includes/class-wp-hook.php:324
    [0x00007f45e8c143f0] apply_filters() /path/to/WordPress/wp-includes/class-wp-hook.php:348
    [0x00007f45e8c14380] do_action() /path/to/WordPress/wp-includes/plugin.php:517
    [0x00007f45e8c142a0] do_action() /path/to/WordPress/wp-admin/admin.php:260

    [05-Sep-2025 19:22:07] [pool 17002707405366737] pid 952179
    script_filename = /path/to/WordPress/wp-admin/tools.php
    [0x00007f45e8c149b0] str_replace() /path/to/WordPress/wp-content/plugins/debug-log-manager/classes/class-debug-log.php:1202
    [0x00007f45e8c146c0] get_processed_entries() /path/to/WordPress/wp-content/plugins/debug-log-manager/classes/class-debug-log.php:1521
    [0x00007f45e8c14580] get_entries_datatable() /path/to/WordPress/wp-content/plugins/debug-log-manager/bootstrap.php:266
    [0x00007f45e8c144d0] create_main_page() /path/to/WordPress/wp-includes/class-wp-hook.php:324
    [0x00007f45e8c143f0] apply_filters() /path/to/WordPress/wp-includes/class-wp-hook.php:348
    [0x00007f45e8c14380] do_action() /path/to/WordPress/wp-includes/plugin.php:517
    [0x00007f45e8c142a0] do_action() /path/to/WordPress/wp-admin/admin.php:260

    [05-Sep-2025 19:22:31] [pool 17002707405366737] pid 951807
    script_filename = /path/to/WordPress/wp-admin/index.php
    [0x00007f45e8c148a0] str_replace() /path/to/WordPress/wp-content/plugins/debug-log-manager/classes/class-debug-log.php:1202
    [0x00007f45e8c145b0] get_processed_entries() /path/to/WordPress/wp-content/plugins/debug-log-manager/classes/class-debug-log.php:1562
    [0x00007f45e8c14470] get_dashboard_widget_entries() /path/to/WordPress/wp-content/plugins/debug-log-manager/bootstrap.php:352
    [0x00007f45e8c143f0] get_dashboard_widget_entries() /path/to/WordPress/wp-admin/includes/template.php:1456
    [0x00007f45e8c14220] do_meta_boxes() /path/to/WordPress/wp-admin/includes/dashboard.php:271
    [0x00007f45e8c14190] wp_dashboard() /path/to/WordPress/wp-admin/index.php:204

    [05-Sep-2025 19:24:45] [pool 17002707405366737] pid 952996
    script_filename = /path/to/WordPress/wp-admin/admin-ajax.php
    [0x00007f45e8c149b0] apply_filters() /path/to/WordPress/wp-includes/plugin.php:205
    [0x00007f45e8c148b0] apply_filters() /path/to/WordPress/wp-includes/l10n.php:207
    [0x00007f45e8c14810] translate() /path/to/WordPress/wp-includes/l10n.php:307
    [0x00007f45e8c14790] __() /path/to/WordPress/wp-content/plugins/debug-log-manager/classes/class-debug-log.php:1393
    [0x00007f45e8c144a0] get_processed_entries() /path/to/WordPress/wp-content/plugins/debug-log-manager/classes/class-debug-log.php:1443
    [0x00007f45e8c14300] get_latest_entries() /path/to/WordPress/wp-includes/class-wp-hook.php:324
    [0x00007f45e8c14220] apply_filters() /path/to/WordPress/wp-includes/class-wp-hook.php:348
    [0x00007f45e8c141b0] do_action() /path/to/WordPress/wp-includes/plugin.php:517
    [0x00007f45e8c140d0] do_action() /path/to/WordPress/wp-admin/admin-ajax.php:192

    [05-Sep-2025 19:24:50] [pool 17002707405366737] pid 952648
    script_filename = /path/to/WordPress/wp-admin/admin-ajax.php
    [0x00007f45e8c14d30] {closure}() /path/to/WordPress/wp-includes/kses.php:1247
    [0x00007f45e8c14cc0] array_filter() /path/to/WordPress/wp-includes/kses.php:1247
    [0x00007f45e8c14b70] wp_kses_attr() /path/to/WordPress/wp-includes/kses.php:1194
    [0x00007f45e8c14a50] wp_kses_split2() /path/to/WordPress/wp-includes/kses.php:1071
    [0x00007f45e8c149c0] _wp_kses_split_callback() /path/to/WordPress/wp-includes/kses.php:1001
    [0x00007f45e8c14940] preg_replace_callback() /path/to/WordPress/wp-includes/kses.php:1001
    [0x00007f45e8c14890] wp_kses_split() /path/to/WordPress/wp-includes/kses.php:756
    [0x00007f45e8c14800] wp_kses() /path/to/WordPress/wp-includes/kses.php:2234
    [0x00007f45e8c14790] wp_kses_post() /path/to/WordPress/wp-content/plugins/debug-log-manager/classes/class-debug-log.php:1225
    [0x00007f45e8c144a0] get_processed_entries() /path/to/WordPress/wp-content/plugins/debug-log-manager/classes/class-debug-log.php:1443
    [0x00007f45e8c14300] get_latest_entries() /path/to/WordPress/wp-includes/class-wp-hook.php:324
    [0x00007f45e8c14220] apply_filters() /path/to/WordPress/wp-includes/class-wp-hook.php:348
    [0x00007f45e8c141b0] do_action() /path/to/WordPress/wp-includes/plugin.php:517
    [0x00007f45e8c140d0] do_action() /path/to/WordPress/wp-admin/admin-ajax.php:192

    [05-Sep-2025 19:24:56] [pool 17002707405366737] pid 952850
    script_filename = /path/to/WordPress/wp-admin/admin-ajax.php
    [0x00007f45e8c14790] str_replace() /path/to/WordPress/wp-content/plugins/debug-log-manager/classes/class-debug-log.php:1202
    [0x00007f45e8c144a0] get_processed_entries() /path/to/WordPress/wp-content/plugins/debug-log-manager/classes/class-debug-log.php:1443
    [0x00007f45e8c14300] get_latest_entries() /path/to/WordPress/wp-includes/class-wp-hook.php:324
    [0x00007f45e8c14220] apply_filters() /path/to/WordPress/wp-includes/class-wp-hook.php:348
    [0x00007f45e8c141b0] do_action() /path/to/WordPress/wp-includes/plugin.php:517
    [0x00007f45e8c140d0] do_action() /path/to/WordPress/wp-admin/admin-ajax.php:192



Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Michael Kupietz

    (@mkupietz)

    It turns out that if you turn live updating off, it prevents the server timeout from happening as soon as the log grows too big. But then, with live updating off, if the log is too big and you open the plugin’s log view screen, the server will time out again. Other pages will still load, but the plugin’s admin screen will time out until you delete the log file.

    Plugin Author Bowo

    (@qriouslad)

    @mkupietz thank you for reporting the issue. When the log file grows too large, it can happen that parsing the log file will significantly consume server resources. Have you tried increasing the memory limit inside WP, and allocating a larger memory for the WP app within the server/hosting settings? 20MB should still be manageable if you have enough memory avalable to process it.

    Do you mind going to Tools >> Site Health >> Info and copy the WP environment info in your next reply?

    Additionally, what kind of hosting does your site use? e.g. shared hosting, VPS, etc.

    Thread Starter Michael Kupietz

    (@mkupietz)

    I’m on a private dedicated host, a Debian 12 VM running on VMware. Neither the host nor the VM are used for anything else, although I have a couple of other very small, rarely-visited vhosts on the same apache server in the VM.

    I haven’t tried adjusting the memory settings. My current memory settings are the result of a very long period of troubleshooting and fine tuning. I’m reluctant to change server configuration to accommodate a single plugin.

    Server architecture Linux 6.1.0-38-amd64 x86_64
    Web server ApachePHP version8.2.29 (Supports 64bit values)
    PHP SAPI fpm-fcgi
    PHP max input variables 3000
    PHP time limit 360
    PHP memory limit 256M
    PHP memory limit (only for admin screens)1024M
    Max input time 320
    Upload max filesize 400M
    PHP post max size 800M
    cURL version7

    Do me a favor, jot down any of those specs if you need them later, and please reply to let me know you’ve read this… I’m going to come back and redact this. I’d rather not leave server internals publicly posted.

    Plugin Author Bowo

    (@qriouslad)

    @mkupietz thank you. The PHP memory limit looks sufficiently large. Feel free to redact your server info.

    When I look at the slow log entry you posted earlier, this line is indicative of where things got slow and/or heavy:

    [0x00007f45e8c149b0] str_replace() /path/to/WordPress/wp-content/plugins/debug-log-manager/classes/class-debug-log.php:1202

    Line 1202 has code that performs replacements to timezone strings in each log entry, e.g. Addis_Ababa] becomes Addis_Ababa]@@@, which is part of the algorithm to parse the debug.log file. This was added in the latest release, v2.3.6.

    Do you mind trying to downgrade to v2.3.5 and see if that solves the issue for you?

    Thread Starter Michael Kupietz

    (@mkupietz)

    It’s not letting me edit my previous reply now to redact my server internals. I’m not thrilled about that. I wouldn’t have posted server internals if I’d known I wouldn’t be able to redact it when the info was no longer needed.

    I downgraded to v2.3.5 and it seems to handle larger logs ok, although I still managed to get a timeout with an extremely large (several hundred MB) logfile. In that case it didn’t even generate a slow log entry, it just timed out until I manually deleted the log.

    Also, the pagination keeps disappearing and reappearing, and when the pagination is gone, the filtering by error type stops working also:

    https://www.imagebam.com/view/ME15SF0S
    https://www.imagebam.com/view/ME15SF0T

    A few minutes after those screenshots, I deleted the log and refreshed the page, and the pagination came back and the filtering started working again:

    https://www.imagebam.com/view/ME15SF2D

    I’ve started getting another weird error message, too, “No error message specified…” https://www.imagebam.com/view/ME15SF2Thttps://www.imagebam.com/view/ME15SF2T

    Thread Starter Michael Kupietz

    (@mkupietz)

    Also, looks like if the the log file is big enough, the plugin consumes all the RAM and causes a fatal error. This is with the previous version still installed.

    Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 574043496 bytes) in /path/to/plugin/folder/debug-log-manager-e552015fb08f8cd14c1293e7b3f3cb94bc4de943/classes/class-debug-log.php on line 342

    There has been a critical error on this website. Please check your site admin email inbox for instructions. If you continue to have problems, please try the support forums.

    Plugin Author Bowo

    (@qriouslad)

    With a log file several hundreds MB large, DLM currently tries to parse it in one go, which can consume all the RAM assigned to your WP app. Something to improve in future iterations. Perhaps by splitting the file somehow, and only parsing the file part containing latest entries. By the way, do you have a good reason to keep the log file that large?

    On pagination issue: it’s possible there is a JS error that prevents the DLM dashboard to finish rendering. Please try to check your browser console when that happens and copy the JS error in your next reply if you see it.

    As for “No error message specified…” entry, please try replacing your v2.3.5 with this one: https://bowo.io/sdc_download/1129/?key=oyvyh2zevy7w5t2n30h422wjdj7t9n, which should return the raw log entry when DLM is unable to parse the raw entry.

    Thread Starter Michael Kupietz

    (@mkupietz)

    Ok, thanks, I’ll install the updated version you linked.

    The reason that file is so large is because I have a plugin that does a ton of function-level caching, and this week I’m logging performance info and cache sets and gets as I work on it to try and optimize things. Once I have those logs analyzed and see what’s going on under the hood and optimize cache calls, that’ll drop… I’m caching way too much, it’s clearly doing something repetitively that it doesn’t need to. That’s the whole reason I’m generating these logs, to figure out where it’s really needed and where it’s spinning its wheels. I typically don’t leave those logs taking up space on on the server, which is why I no longer have entries from 2 days ago.

    I also, unfortuntately, have some plugin or theme file that resets my log to E ALL even though I have my config set to errors only, so I sometimes get a ton of warnings and deprecation notices as well. Your plugin makes it much easier not to have to see those, for sure, but they do add to the bulk a little.

    Ah, didn’t think to look at the js console. I don’t want to spend a whole lot of time troubleshooting edge cases but if it happens again, that’s what I’ll do & I’ll let you know.

    Plugin Author Bowo

    (@qriouslad)

    Thank you for explaining further, which gave me better context. Sounds good.

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

The topic ‘Server Timeout when debug log gets too large’ is closed to new replies.