wp_memory_near_limit
Severity: Warning
Signal: memory_near_limit — peak PHP memory usage exceeded 90% of WP_MEMORY_LIMIT
What this signal means
A request consumed more than 90% of the available PHP memory limit. The site is close to running out of memory on these requests.
What surprise this prevents
Pages silently dying mid-render with a white screen — no error message shown to the user, and no indication of the cause without memory monitoring in place.
Why it matters
When PHP exhausts its memory limit, the request dies with a fatal error (Allowed memory size of X bytes exhausted). This causes white screens and incomplete pages. High memory usage also impacts server stability on shared hosting.
Investigate
View entity alerts in Logystera →
Check the alert payload for:
payload.peak_mb— how much was used?payload.limit_mb— what is the current limit?payload.percent— how close to the limit?
Look at which pages or requests triggered the alert using correlated http.request signals (same labels.request_id). Is it a specific admin page, a WooCommerce checkout, or a REST API call?
Recommended actions
-
Increase the memory limit as an immediate measure:
php // wp-config.php define( 'WP_MEMORY_LIMIT', '256M' ); define( 'WP_MAX_MEMORY_LIMIT', '512M' ); // For admin operationsOr via.htaccess:apache php_value memory_limit 256M -
Identify the memory-hungry code. Enable WP_DEBUG and check if there's a specific plugin or theme causing the spike. Deactivate plugins one by one to find the culprit.
-
Check for memory leaks in plugins. Some plugins accumulate data in memory across hooks without cleaning up. Common offenders: page builders, WooCommerce extensions, SEO plugins processing large datasets.
-
Optimize image imports. Importing many large images at once is a common cause of memory spikes. Use a dedicated import tool with chunking.
-
Review your hosting plan. If the memory limit is already 256MB and usage is consistently near the limit, the site has genuinely grown beyond its current hosting tier.
When to safely ignore
A brief spike during a one-time admin operation (bulk import, plugin installation, theme compilation) is expected. If the signal fires once during an admin task and does not recur during normal page loads, no action is required.
If payload.percent is consistently between 90–95% but the site is stable, consider it a warning to address before the next traffic spike rather than an immediate incident.
Signal reference
{
"event_type": "memory_near_limit",
"payload": {
"peak_mb": 118.2,
"limit_mb": 128,
"percent": 92
}
}