• Resolved stevedoig

    (@stevedoig)


    Hi,

    Our Wordfence scans keep failing.

    I’ve tried the contant:

    define('WORDFENCE_SCAN_FAILURE_THRESHOLD', 1800);

    and disabling scanning of images, but the issue remains.

    The current scan failed after 13 minutes.

    “The current scan looks like it has failed. Its last status update was 13 mins ago. You may continue to wait in case it resumes or stop and restart the scan. Some sites may need adjustments to run scans reliably.”

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter stevedoig

    (@stevedoig)

    I removed the constant

    define('WORDFENCE_SCAN_FAILURE_THRESHOLD', 1800);

    Hi @stevedoig
    Please kill any running scan at the moment, then make sure you have “Enable debugging mode” option checked under (Wordfence > Tools > Diagnostics > Debugging Options), and start a new scan.

    When it hangs, please send me the scan activity log by clicking on this link as in this screenshot, you can send the log to “alaa [at] wordfence [dot] com”, I’ll take a look at this log and let you know my findings.

    Thanks.

    Thread Starter stevedoig

    (@stevedoig)

    Hi @wfalaa,

    All done. Email should reach you soon.

    Thanks,
    Steve

    Hi Steve,
    I’ve received the report, thanks!

    Upon checking the scan activity log you sent me, I can see “Scan images, binary, and other files as if they were executable” is still enabled, are you sure you disabled this option and clicked “Save Changes”?

    Also, I can see you didn’t exclude the cache directory, you can add /wp-content/cache/* in “Exclude files from scan that match these wildcard patterns” under (Wordfence > Scan > Scan Options and Scheduling) to exclude these files from the scan.

    Please double check these two steps along with other suggestions mentioned here, then run a new scan and send me a new scan activity log.

    Thanks.

    Thread Starter stevedoig

    (@stevedoig)

    Hi @wfalaa.

    “Scan images, binary, and other files as if they were executable” was definitely not turned on when I checked this morning.

    I turned it on, then saved, turned it off, then saved.

    I also excluded wp-content/cache/* from the scan, but the scan stopped after about 20 minutes again.

    • This reply was modified 7 years, 1 month ago by stevedoig.
    Thread Starter stevedoig

    (@stevedoig)

    Hi @wfalaa.

    Any update on this?

    Thanks,
    Steve

    Hi Steve,
    When you exclude any directory from the scan, the supported format is similar to this:
    /wp-content/cache/* please use this exact format “with slash”, then disable other installed plugins -temporarily- and try to run a new scan in the debugging mode, when it hangs please send me a new scan activity log.

    Thanks.

    Thread Starter stevedoig

    (@stevedoig)

    Hi @wfalaa,

    All done. Email sent.

    Thanks,
    Steve

    Hi Steve,
    May I know the current value of “Maximum execution time for each scan stage” under (Wordfence > Scan > Scan Options and Scheduling > Performance Options)?

    Please follow this guide while setting this option, I’ll share the specific snippet you might find helpful:

    First try 30, save and do a scan. If the scan does not complete, then try 15, save and do a scan. If it still doesn’t complete then try 12. If you still don’t have any luck getting a scan to complete, then there may be another problem, or you may have to ask your hosting provider to increase the amount of time a web server process is allowed to execute.

    Let me know how it goes,
    Thanks.

    Thread Starter stevedoig

    (@stevedoig)

    Hi Alaa,

    There was no value set for “Maximum execution time for each scan stage”.

    I tried 30, 15, 12 and each time the scan failed.

    PHP max_execution_time was set to 300.

    Advice appreciated.

    Regards,
    Steve

    wfalaa

    (@wfalaa)

    Hi Steve,
    My next step will be disabling other installed plugins, then choose “Limited Scan” in “Basic Scan Type Options” under (Wordfence > Scan > Scan Options and Scheduling).

    Let me know how it goes,
    Thanks.

    Thread Starter stevedoig

    (@stevedoig)

    Hi Alaa,

    I had to leave:

    • Gravity Forms
    • LiteSpeed Cache
    • The SEO Framework
    • WP Mail SMTP

    enabled so the site could function okay.

    I switched to basic scan, and the scan lasted about 20 minutes before failing again.

    Thread Starter stevedoig

    (@stevedoig)

    I switched from:

    define('WP_DEBUG', true);
    define('WP_DEBUG_DISPLAY', true);

    to:

    define('WP_DEBUG', false);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);

    in wp-config.php, but the scan failed again.

    Thread Starter stevedoig

    (@stevedoig)

    I disabled the remainder plugins except for

    • Gravity Forms
    • Wordfence

    but the scan failed again.

    wfalaa

    (@wfalaa)

    Hi,
    Since you have “LiteSpeed Cache” plugin activated, then for sure your website is hosted on LiteSpeed web server, so please follow these instructions to stop LiteSpeed from killing or stopping processes on your server.

    Let me know how it goes,
    Thanks.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘scan not finishing: “Scan Failed”’ is closed to new replies.