Troubleshooting Broken Link Checker Performance and Resource Issues
Content
Many WordPress site administrators rely on the Broken Link Checker plugin to maintain site integrity. However, a common challenge faced by users is the plugin's significant consumption of server resources, which can lead to performance degradation, timeouts, and even site crashes. This guide explores the root causes of these issues and provides practical solutions to optimize the plugin's operation.
Common Symptoms of Resource Overload
Users often report specific error messages and performance problems indicative of resource strain:
- Server Load Warnings: Messages like "WARN: Server load is too high, stopping" or the plugin exceeding its configured "Server load limit."
- Timeouts and Gateway Errors: Frequent "504 Gateway time-out" errors, "Maximum execution time exceeded" errors, or "Internal Request Timeout" errors during scans.
- Database Strain: An overloaded database leading to "Too many MySQL connections" errors, often with numerous pending 'delete' queries from the plugin.
- Process Stalls: Scans that abort with messages like "Scan aborted: Too many server errors" or checking processes that appear to stall indefinitely.
- Admin-Ajax Overload: The plugin hitting
admin-ajax.phpvery frequently, causing high server load.
Why These Performance Issues Occur
The Broken Link Checker plugin is resource-intensive by nature. It must parse your site's content, check numerous internal and external URLs, and manage a large database of links and instances. Several factors can exacerbate its resource usage:
- Large Sites: Sites with tens of thousands of links or a very high number of pages place a heavy demand on the plugin.
- Incompatible Settings: Plugin settings (e.g., Max. execution time) that conflict with stricter server-level PHP configurations (like
max_execution_timeorWP_MEMORY_LIMIT) can cause failures. - Database Upgrade Routine: A known issue, particularly for multisite installations, is that database upgrade scripts run on the
inithook. On high-traffic sites, this can trigger the upgrade process simultaneously across thousands of requests, potentially leading to database lockouts. - Cloud Scan Limitations: The cloud-based scan has a hard timeout limit (reportedly 3 hours), which may be insufficient for very large sites, causing scans to fail before completion.
- Scheduled Tasks: If the WordPress cron is not configured optimally (e.g., relying on server-side cron instead of WordPress's pseudo-cron), scheduled link checks may not complete efficiently.
Optimization Strategies and Solutions
Based on community feedback and common resolutions, here are the most effective ways to mitigate these performance problems.
1. Adjust Advanced Settings
The plugin's Advanced tab offers several levers to control its resource consumption. The goal is to make it work in smaller, less intensive chunks.
- Server Load Limit: Lower this value significantly. While the default might be high (e.g., 6.00), try a much more conservative value like 0.5 or even 0.35. This tells the plugin to pause its work more frequently if server load increases.
- Target Resource Usage: This setting controls how much of the available PHP execution time the plugin should aim to use. A lower percentage (e.g., 10%) is safer for shared hosting environments.
- Max. Execution Time: Crucially, ensure this value is not higher than your server's actual
max_execution_timePHP setting. If your server kills scripts after 30 seconds, setting this to 300 will cause errors. Match it to or set it slightly below your server's limit. - Check Frequency: Increase the "Check each link" interval (e.g., to every 72 hours or more) to reduce how often links need to be re-verified.
2. Review Server and WordPress Configuration
Ensure your server environment can support the plugin's operations.
- Verify your server's PHP
max_execution_time,memory_limit, and WordPress'sWP_MEMORY_LIMITare set to sufficient values for your site's size. - Be aware that the plugin stores its own timeout setting in the database. There are reports that this setting can override server configurations even when the plugin is deactivated. If you encounter mysterious timeout errors, reactivating the plugin to adjust its settings may resolve them.
3. Limit the Scope of Checking
Reduce the plugin's workload by telling it to check fewer things.
- In the Look For Links In tab, disable checking in post types you don't need (e.g., comments, certain custom fields).
- In the Which Links To Check tab, consider excluding specific link types or domains.
4. Consider the Cloud Version (With Caveats)
The cloud version offloads the processing from your server to WPMU Dev's servers, which can significantly reduce local resource usage. However, users report its own set of challenges:
- It may be blocked by security plugins, .htaccess rules, or bot mitigation systems, requiring you to whitelist its IPs.
- It has a fixed timeout (e.g., 3 hours) that cannot be changed, which may still be insufficient for massive sites.
- It relies on your site's cron system; if cron is not running frequently, cloud-based actions like unlinking may not complete promptly.
5. For Multisite and High-Traffic Installations
The database upgrade issue is a significant pain point. While a permanent fix would require changes from the Broken Link Checker development team, a documented workaround for large networks is to:
- Manually comment out the upgrade script in the plugin code before updating.
- Deploy the update across the network.
- Write and run a custom CLI script to execute the database upgrade for each site individually in a controlled manner.
When All Else Fails
If continuous performance issues are impacting your site's stability, consider using the plugin intermittently rather than leaving it active 24/7. Activate it, run a manual scan to identify broken links, address them, and then deactivate it until the next time you need to perform a check. This is a common strategy on resource-constrained hosting environments.
By understanding the demands of the Broken Link Checker plugin and proactively configuring your settings and server environment, you can harness its power to maintain a healthy site without sacrificing performance.
Related Support Threads Support
-
3 hr Timeout limit on Broken Link Checkerhttps://wordpress.org/support/topic/3-hr-timeout-limit-on-broken-link-checker/
-
Script timeout in Broken Link Checkerhttps://wordpress.org/support/topic/script-timeout-in-broken-link-checker/
-
Problems with cloud versionhttps://wordpress.org/support/topic/problems-with-cloud-version/
-
Database full from broken links foundhttps://wordpress.org/support/topic/database-full-from-broken-links-found/
-
resource consumptionhttps://wordpress.org/support/topic/resource-consumption/
-
Scan aborted: Too many server errors.https://wordpress.org/support/topic/scan-aborted-too-many-server-errors-3/
-
Improving performancehttps://wordpress.org/support/topic/improving-performance-3/
-
Please fix how you upgrade the databasehttps://wordpress.org/support/topic/please-fix-how-you-upgrade-the-database/
-
Checking Stalledhttps://wordpress.org/support/topic/checking-stalled/
-
Scan aborted: Too many server errorshttps://wordpress.org/support/topic/scan-aborted-too-many-server-errors-2/
-
Too Many MySQL Connectionshttps://wordpress.org/support/topic/too-many-mysql-connections-3/
-
21 Internal Request Errorhttps://wordpress.org/support/topic/21-internal-request-error/
-
Getting “Error 504 Gateway time-out” a lothttps://wordpress.org/support/topic/getting-error-504-gateway-time-out-a-lot/
-
Unnecessary database queries?https://wordpress.org/support/topic/unnecessary-database-queries/
-
Online Version unusable due to timeoutshttps://wordpress.org/support/topic/online-version-unusable-due-to-timeouts/
-
Scan aborted: Too many server errors.https://wordpress.org/support/topic/scan-aborted-too-many-server-errors/
-
“Loading” foreverhttps://wordpress.org/support/topic/loading-forever-3/
-
Causing PHP processes to remain openhttps://wordpress.org/support/topic/causing-php-processes-to-remain-open/
-
Resource hog?https://wordpress.org/support/topic/resource-hog-9/
-
db migration run to oftenhttps://wordpress.org/support/topic/db-migration-run-to-often/
-
Version 1.11.13 Crashed Two Websites Yesterdayhttps://wordpress.org/support/topic/version-1-11-13-crashed-two-websites-yesterday/
-
BLC Plugin causing daily downtimehttps://wordpress.org/support/topic/blc-plugin-causing-daily-downtime/
-
Out of memory: Kill processhttps://wordpress.org/support/topic/out-of-memory-kill-process/
-
Is it a valid approach?https://wordpress.org/support/topic/is-it-a-valid-approach/
-
WARN: Server load is too high, stopping.https://wordpress.org/support/topic/warn-server-load-is-too-high-stopping/
-
Plugin settings override server and wp-config, even when deactivatedhttps://wordpress.org/support/topic/plugin-settings-override-server-and-wp-config-even-when-deactivated/