Logs Getting created

This is an odd behavior, the following logs are getting created, and is overflowing the Network, and crashing the site due to big log files:

[23-Jun-2018 08:41:27 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /var/www/vhosts/+++.com/laurentcuchet+++.com/wp-content/plugins/wpmudev-updates/includes/class-wpmudev-dashboard-ui.php on line 1612
[23-Jun-2018 08:41:27 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /var/www/vhosts/++++.com/laurentcuchet.++++.com/wp-content/plugins/wpmudev-updates/includes/class-wpmudev-dashboard-ui.php on line 1612
[23-Jun-2018 08:41:27 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /var/www/vhosts/+++++.com/laurentcuchet.+++++.com/wp-content/plugins/wpmudev-updates/includes/class-wpmudev-dashboard-ui.php on line 1612

It's creating 1GB logs per second with the above notices, and hence crashing the server due to big file size. I want to keep debug mode enabled, and zlib.output_compression enabled.

Would like to know a workaround to make it work, without disabling the above specified.

  • Adam Czajczyk

    Hello Laurent_C

    I hope you're well today and thank you for your question!

    This is a very specific issue. It's a well known WP problem but at the same time quite rare. I must say that so far I've never came across that being reported and I also wasn't able to replicate it in any way. It seems to be related to zlib output compression settings which should be set - in PHP configuration to "off" in order to avoid automatic buffer clearing. That's my understanding, though, and I'm not exactly sure how this relates to our plugins, especially taking into account that the lines of code reported in the notice message seem to be there to actually handle exceptions (or, in other words, to deal with such "unexpected" scenarios).

    Having that said, I've forwarded this issue directly to our developers so they could look into the code, check your site configuration and find out why this is happening - and to apply a solution.

    Please keep track of this ticket for further information and we'll update it as soon as possible.

    Kind regards,
    Adam

  • Konstantinos Xenos

    Hi Laurent_C ,

    WordPress doesn't play nice with zlib.output_compression. The issue you're facing will always come to the surface whenever a plugin uses an ob_end_flush() resulting in massive error_logs if debugging is on. There have been discussion on Core for ~ 7 years now but the issue hasn't yet been resolved.

    One of the workarounds is usually to set remove_action( 'shutdown', 'wp_ob_end_flush_all', 1 ); in your template functions.php. Or revert to ob_start("ob_gzhandler"); the same way. Unfortunately I see that you have already set this up and the issue is apparently not going away.

    If none of the above help the only way would be to go towards turning zlib.output_compression Off, and use a cache plugin that will handle caching. That being said since you are already using Hummingbird, I can't be sure of why you want to have zlib to On as well. Using different various methods usually ends on stressing the server even more and resulting on overcompressed files among other issues.

    I hope this helps on clearing some points a bit.

    Tell us if you need further assistance.

    Best regards,
    Konstantinos

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.