• Resolved lohanelbt

    (@lohanelbt)


    Hi!

    I’m contacting you because during the automated site scans performed by our plugin, I receiving a “JSON invalid” error with Error Code 524: A timeout occurred.

    Last month, the issue was caused by a network problem on your side.

    Could you please investigate ?

    Thank you for your assistance.

    Best regards,

    • This topic was modified 8 months ago by lohanelbt.
    • This topic was modified 8 months ago by lohanelbt.
    • This topic was modified 8 months ago by lohanelbt.
    • This topic was modified 8 months ago by lohanelbt.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter lohanelbt

    (@lohanelbt)

    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.

    Plugin Support kmarusek

    (@kmarusek)

    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:

    1. Clear all plugin, server, and CDN-level caches, including page caching and your browser cache.
    2. 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.
    3. In Solid Security, go to Security > Debug, then click the Schedule tab and use the Reset button to refresh all scheduled tasks.
    4. 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

    slash2

    (@slash2)

    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

    Plugin Support chandelierrr

    (@shanedelierrr)

    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!

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.