• Resolved LauraH55

    (@laurahantz55)


    Hello,

    I have had a problem with WordFence for a few months.
    My scans don’t finish anymore, they fail every time and I noticed that it makes my database “explode” from 90mb to more than 500! I always have this message “The scan time limit of 8 hours has been exceeded and the scan will be terminated. This limit can be customized on the options page”

    I changed the duration of the scans etc, nothing works!

    How to do ?
    Thank you

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @laurahantz55, thanks for your detailed message about your issue.

    It is possible, but not the usual case, for the scan to encounter a huge number of files or folders. It could be worth trying to prevent this by deselecting Wordfence > All Options > General Options > Scan files outside your WordPress installation (if it isn’t already.)

    You could also ensure max_execution_time = 60 in php.ini, Wordfence’s scan only ever attempts to use half of this value by default.

    Your WP_MEMORY_LIMIT could be set to 128M or 256M in wp-config.php. WooCommerce, for example, recommend 64M minimum, so if you also have many hits on the site at once especially during a scan, a lower limit here could be reached fairly easily. Your PHP memory_limit value could also be adjusted to 128M or 256M to accommodate this change.

    Failing this, can you please try the following to get me 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 your 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 for some servers. If this fixes the issue and scans run again, you can leave all the settings above except for “Enable Debugging Mode”.

    For a screenshot of my recommended Performance setting options – Click Here.

    There are some specific environments where scans could be aborted by the server or other settings might need to be configured. If nothing has helped so far, you can also send a diagnostic report to wftest @ wordfence . com using the link at the top of the Wordfence > Tools > Diagnostics page. Then click on “Send Report by Email”. Please add your forum username where indicated and respond here after you have sent it.

    NOTE: It should look as follows – Screenshot of Tools > Diagnostic > Send by Email

    Thanks,
    Peter.

    Thread Starter LauraH55

    (@laurahantz55)

    Thanks for your help.
    The scan failed again. My database exploded again. In my table devoted to Wordfence it has grown to more than 2 million rows.

    After I emptied the table in my database and recalculated the quota on OVH, the scan started again and ended. But it automatically fails at “Files”.

    Here are the last 20 lines of the scan:

    • [Jan 05 14:50:32] Scanning contents: wp-content/cache/page_enhanced/happy-lobster.com/sujet/trendyliss/_index_slash.html (Size: 137.44 KB Mem: 134 MB)
    • [Jan 05 14:50:32] Scanning contents: wp-content/cache/page_enhanced/happy-lobster.com/sujet/trendyliss/_index_slash_ssl.html (Size: 137.5 KB Mem: 134 MB)
    • [Jan 05 14:50:32] Scanning contents: wp-content/cache/page_enhanced/happy-lobster.com/sujet/triacneal/_index_slash.html (Size: 137.76 KB Mem: 134 MB)
    • [Jan 05 14:50:33] Scanning contents: wp-content/cache/page_enhanced/happy-lobster.com/sujet/triacneal/_index_slash_ssl.html (Size: 137.81 KB Mem: 134 MB)
    • [Jan 05 14:50:33] Scanning contents: wp-content/cache/page_enhanced/happy-lobster.com/sujet/trnd/_index_slash.html (Size: 141.29 KB Mem: 134 MB)
    • [Jan 05 14:50:33] Scanning contents: wp-content/cache/page_enhanced/happy-lobster.com/sujet/trnd/_index_slash_ssl.html (Size: 139.3 KB Mem: 134 MB)
    • [Jan 05 14:50:33] Scanning contents: wp-content/cache/page_enhanced/happy-lobster.com/sujet/trousse-beaute-biba/_index_slash.html (Size: 137.72 KB Mem: 134 MB)
    • [Jan 05 14:50:33] Scanned contents of 4291 additional files at 6.77 per second
    • [Jan 05 14:50:33] Scanning contents: wp-content/cache/page_enhanced/happy-lobster.com/sujet/trousse-beaute-biba/_index_slash_ssl.html (Size: 137.78 KB Mem: 134 MB)
    • [Jan 05 14:50:33] Scanning contents: wp-content/cache/page_enhanced/happy-lobster.com/sujet/tubereuse-hedonie/_index_slash_ssl.html (Size: 135.91 KB Mem: 134 MB)
    • [Jan 05 14:50:33] Scanning contents: wp-content/cache/page_enhanced/happy-lobster.com/sujet/tuto/_index_slash_ssl.html (Size: 141.36 KB Mem: 134 MB)
    • [Jan 05 14:50:33] Scanning contents: wp-content/cache/page_enhanced/happy-lobster.com/sujet/typology/_index_slash_ssl.html (Size: 147.86 KB Mem: 134 MB)
    • [Jan 05 14:50:34] Forking during hash scan to ensure continuity.
    • [Jan 05 14:50:34] Entered fork()
    • [Jan 05 14:50:34] Calling startScan(true)
    • [Jan 05 14:50:34] Got value from wf config maxExecutionTime: 20
    • [Jan 05 14:50:34] getMaxExecutionTime() returning config value: 20
    • [Jan 05 14:50:34] Cached result for scan start test: true
    • [Jan 05 14:50:34] Starting cron with normal ajax at URL https://happy-lobster.com/wp-admin/admin-ajax.php?action=wordfence_doScan&isFork=1&scanMode=standard&cronKey=683c9bd942c48abaaf65aca41928c1e1&signature=cc712c450ae610106e29f2d10615651a01a9703753ec0178c1ce52291908e29b
    • [Jan 05 14:50:35] Scan process ended after forking.

    Thanks

    Thread Starter LauraH55

    (@laurahantz55)

    I sent the report also from the plugin as requested.

    Can you try adding wp-content/cache/*/_index_slash.html to the list of files to skip on the Wordfence > Scan > Scan Options and Scheduling page in the Advanced Scan Options section where it says Exclude files from scan that match these wildcard patterns? Save the changes and try a new scan.

    Mia

    Thread Starter LauraH55

    (@laurahantz55)

    Hello Mia,

    Thanks for the answer ! It’s seems great ! The scan succeed !

    Thank you so much

    No problem!

    Mia

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘The scan time limit of 8 hours has been exceeded (…)’ is closed to new replies.