• Resolved Adrian

    (@adriandw)


    I am opening a new thread following the suggestion of @wfalaa in https://wordpress.org/support/topic/scan-terminated-2/

    I have two completely different WordPress 4.8.1 sites both hosted by SiteGround but on different accounts and hosted on different servers.
    Each has the same problem: the full scan never completes, it runs for between 30 seconds and a minute and then never gets any further, and eventually I kill it.

    With the smaller site (18 plugins), and no scanning options disabled, if I exclude the plugins directory from the scan, the scan is successful.
    If I exclude 9 plugins from the scan, it hangs (whether I exclude the first 9 or the second 9).
    If I exclude 15 plugins from the scan, it completes OK.

    So I’m thinking there must be some load-limiting or load-related issue.

    The server log has a couple of 504 errors. Could that be relevant?

    86.176.xx.yy - - [05/Aug/2017:11:29:57 +0100] "POST /wp-admin/admin-ajax.php HTTP/1.0" 504 247 "http://aaa.bbb.uk/wp-admin/admin.php?page=WordfenceScan" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36"
    
    77.104.xxx.xxx - - [05/Aug/2017:11:29:57 +0100] "GET /wp-admin/admin-ajax.php?action=wordfence_doScan&isFork=0&scanMode=full&cronKey=2d2eb79d4609a51716e24725 HTTP/1.0" 504 247 "-" "WordPress/4.8.1; http://aaa.bbb.uk"
Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi Adrian,
    Please kill any running scans at the moment, and make sure “Debugging mode” is enabled, then start a new one and when it hangs click on “Email activity log” and email it to “alaa [at] wordfence [dot] com”, also emailing a diagnostics report from (Wordfence > Tools => Diagnostics) to the same email address would be helpful.
    And may I know which options you have selected in “Scans to include” section? you can share a screenshot showing these options.

    Thanks.

    I have solved the problem on both sites using the following settings on the Wordfence Options panel:

    1. Check “Use low resource scanning (reduces server load by lengthening the scan duration)”
      (by itself this didn’t fix the problem)
    2. Maximum execution time for each scan stage: 20
    3. Update interval in seconds (2 is default) 5

    The first of the above settings is also available under the Scan/Options tab.
    The other two options are only only available on the main Wordfence Options page.
    These were the only settings I tried, so maybe Max execution time of 30 would also have worked.

    Never had a problem with Scans hanging until updating to Version 6.3.16, now they all hang… seems not the new version as 6.3.15 hangs also
    sent a couple activity/diagnostic logs to you

    • This reply was modified 2 years, 4 months ago by mymousepad. Reason: new info

    @adriandw Thanks for the update!

    @mymousepad try to increase the “WP_MEMORY_LIMIT” to something like “256M” and re-check this issue, if this doesn’t help, then please open a new support topic as per the forums rules and we will be glad to help you further over there.

    Thanks.

    @mymousepad my “WP_MEMORY_LIMIT” was already set to “256M” when I had the problem, it was setting max execution time for each scan stage to 20 that fixed it for me.

    @wfalaa I would probably have found my solution more quickly if the “max execution time per scan stage” setting were accessible under Scan/Options as well as the general wordfence options tab.
    It seems inconsistent to have the scan performance settings split across two different screens.

    @adriandw this will be taken in consideration in one of the upcoming releases.

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘scan hangs’ is closed to new replies.