In the logs, I can see that the issue happens when the plugin tries to connect to itsec-site-scanner.ithemes.com, which is returning an error, while Cloudflare is showing a “working” status. This suggests that the problem is on your server’s side, as it’s not responding in time.
Hi @lohanelbt ,
The “invalid JSON” error paired with a 524 timeout usually points to a conflict with caching or scheduled tasks timing out. While a previous issue on our end did cause this for some users, that has since been resolved — and based on current support volume, it appears the issue is now limited to isolated cases.
Here’s what I recommend:
- Clear all plugin, server, and CDN-level caches, including page caching and your browser cache.
- Clear all site transients — you can use a plugin like WP Optimize, or run
wp transient delete --all via WP-CLI if you’re comfortable with the command line.
- In Solid Security, go to Security > Debug, then click the Schedule tab and use the Reset button to refresh all scheduled tasks.
- Double-check your Google Analytics code, if present. We’ve had one report where a malformed GA script was interfering with scan completion and returning invalid JSON.
After running through these steps, please give the system 1–2 days to complete a new scan. Let us know how it goes — happy to dig in further if the error persists.
Best,
Kevin
SolidWP Support
Hi @kmarusek,
I ran into the same issue and after debugging I saw the following code in the plugin.
wp-content/plugins/better-wp-security/core/modules/site-scanner/api.php
$cached = set_site_transient( $cache_key, $cache, (int) $mapped[‘max-age’] );
What if max-age is 0, it is going to be cached forever.
Maybe good to check if $mapped[‘max-age’] > 0
Regards,
SLASH2
Hello @slash2,
Came across your suggestion here!
The 524 timeout was a temporary upstream issue that is now resolved.
That said, you’re right that in WP, passing an expiration of 0 to set_site_transient() causes the transient to persist indefinitely and that it’s a good idea to guard against unintended permanent caching of scan responses.
I’ve logged this as a feature request here: https://solidwp.featureos.app/p/prevent-indefinite-caching-in-solid-security-when-cache-control-max-age-0
I’d recommend dropping your thoughts so our team can review it.
Thank you for helping us make the plugin solid!