• Resolved Steve Coryell

    (@stevecoryell)


    I got this message in WordFence today … “The scan time limit of 6 hours 56 minutes has been exceeded and the scan will be terminated.” Besides extending the scan time even further may I request some guidance on how to properly configure the scan to run to completion?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @stevecoryell, thanks for getting in touch.

    It seems like one action may have timed out during the scan even though it stated a long running time before termination. Usually shorter execution times and timeouts are the better option. Ensure max_execution_time = 60 (or less) in php.ini. Wordfence’s scan only ever attempts to use half of this value by default but we have noticed issues with values higher than 60, or when its set to 0, which is effectively “no limit”. Next up, if you’re using Litespeed, scan timeout issues can occur unless a configuration change is made, too. You may not have that but thought it was worth mentioning.

    If the above needed some changes, try another manual scan. Failing that, try the following to get us some more information about the scan itself:

    • Stop the existing scan if it is still running (The “Start New Scan” button turns into a “Stop” button while the scan is running).
    • Go to Wordfence > Scan > Manage Scan and locate the “Performance Options” section. Set “Maximum execution time for each scan stage” to 20.
    • Click to “Save Changes”.
    • Go to the Tools > Diagnostics page.
    • In the “Debugging Options” section check the circle “Enable debugging mode”.
    • If “Start scan remotely” is checked, uncheck this option.
    • Click to “Save Changes”.
    • Start a new scan on the Scan page.
    • If the scan fails again, copy the last 20 lines or so from the Log (click the “Show Log” link) once the scan finishes and paste them in the post.

    On some sites, this will correct the issue. Adding “20” for the “Maximum execution time for each scan stage” tells the scan to pause every 20 seconds and start again where it left off, which makes the scan more performance-friendly on some servers. If this fixes the issue and scans run again, you can leave all the settings above except for “Enable Debugging Mode”.

    Many thanks,
    Peter.

Viewing 1 replies (of 1 total)

The topic ‘Scan Timeout’ is closed to new replies.