Hi @pallavichanodia, thanks for getting in touch!
It sounds counter-intuitive but a higher timeout is often more problematic than a lower one. If you’re using Litespeed, for example, noabort code usually needs to be added to prevent communication stopping abruptly during scans. We also recommend setting max_execution_time in php.ini to a value of 60 or lower, excluding 0 which would be unlimited.
- Stop any 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.
Thanks,
Peter.
Thread Starter
pallavi
(@pallavichanodia)
Hi Peter,
Thank you for replying.
I have set Maximum execution time for each scan stage” to 20 and not yet changed max_execution_time in php.ini to a value of 60 or lower.
Below are last lines from log
[Apr 07 07:23:20] 12029 files indexed
[Apr 07 07:23:20] Forking during indexing: /public_html/wp-content/<themes-name>/.git/objects/22/0afd55b25c49b524ce987a0ec09cd7bf0f5e48
[Apr 07 07:23:20] Entered fork()
[Apr 07 07:23:20] Calling startScan(true)
[Apr 07 07:23:20] Got value from wf config maxExecutionTime: 20
[Apr 07 07:23:20] getMaxExecutionTime() returning config value: 20
[Apr 07 07:23:20] Cached result for scan start test: true
[Apr 07 07:23:20] Starting cron with normal ajax at URL /admin-ajax.php?action=wordfence_doScan&isFork=1&scanMode=custom&cronKey=&signature=
[Apr 07 07:23:21] Scan process ended after forking.
And various lines like below where the file is skipped
[Apr 07 07:23:17] Skipping unneeded hash: /wp-content/plugins/woocommerce-social-login/vendor/skyverge/wc-plugin-framework/woocommerce/i18n/languages/woocommerce-plugin-framework-es_MX.mo
Thank you,
Pallavi
Thread Starter
pallavi
(@pallavichanodia)
Hi,
Can you please check this?