Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Health_Check_Debug_Log_Viewer: Avoid OOM errors because of large log files #475

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

akirk
Copy link
Member

@akirk akirk commented Oct 4, 2024

Short introduction

  • This fixes out of memory errors when you have a large logfile in WP_DEBUG_LOG and you visit site-health.php?tab=tools, for example:
PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 456622416 bytes) in wp-includes/formatting.php on line 4720

Description of what the PR accomplishes

  • Instead of reading the whole log file, only read the last 200k which should give plenty of data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant