Support » Plugin: Wordfence Security - Firewall & Malware Scan » Scan process ended after forking

  • Resolved kenrichman

    (@kenrichman)


    Scans will not run – after just a second I get the message ‘Scan stop request received.’
    I have tried the various suggestions to fix this problem that I have seen in this forum but to no avail. I will sent the activity log to wftest@… hopefully you can help.

    Here are the last debug log lines:

    [Apr 28 12:07:15] Calling Wordfence API v2.26:https://noc1.wordfence.com/v2.26/?k=f36b9c6bd41ba4aefd00c7ce556b73f9eaac20aaefc45aab3583413e591ca57d9cd1aaae7a66b86c67bf42ba40a9253b994021bf1cd78afdc7588c0ab058c41f539070a0d7fccda48569c788cef7c88a90068c4c970ec7f7531125f0728af8eb&s=eyJ3cCI6IjUuOS4zIiwid2YiOiI3LjUuOSIsIm1zIjpmYWxzZSwiaCI6Imh0dHBzOlwvXC93d3cuYWxsaWVkYXJ0aXN0cy1pbGx1c3RyYXRpb24uY29tIiwic3NsdiI6MjY5NDg4MjA3LCJwdiI6IjcuNC4yOSIsInB0IjoibGl0ZXNwZWVkIiwiY3YiOiI3LjcxLjAiLCJjcyI6Ik9wZW5TU0xcLzEuMS4xZCIsInN2IjoiTGl0ZVNwZWVkIiwiZHYiOiIxMC4zLjM0LU1hcmlhREItbG9nLWNsbC1sdmUiLCJsYW5nIjoiIn0&betaFeed=0&action=timestamp
    [Apr 28 12:09:16] Scan stop request received.
    [Apr 28 12:09:28] Ajax request received to start scan.
    [Apr 28 12:09:28] Entering start scan routine
    [Apr 28 12:09:28] Got value from wf config maxExecutionTime: 0
    [Apr 28 12:09:28] Got max_execution_time value from ini: 600
    [Apr 28 12:09:28] ini value of 600 is higher than value for WORDFENCE_SCAN_MAX_INI_EXECUTION_TIME (90), reducing
    [Apr 28 12:09:28] getMaxExecutionTime() returning half ini value: 45
    [Apr 28 12:09:29] Test result of scan start URL fetch: array ( 'headers' => Requests_Utility_CaseInsensitiveDictionary::__set_state(array( 'data' => array ( 'date' => 'Thu, 28 Apr 2022 12:09:29 GMT', 'content-type' => 'text/html; charset=UTF-8', 'cf-ray' => '702fb0735b6c72d2-LHR', 'cache-control' => 'no-cache, must-revalidate, max-age=0', 'expires' => 'Wed, 11 Jan 1984 05:00:00 GMT', 'vary' => 'Accept-Encoding,User-Agent,User-Agent', 'cf-cache-status' => 'DYNAMIC', 'expect-ct' => 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"', 'referrer-policy' => 'strict-origin-when-cross-origin', 'x-content-type-options' => 'nosniff', 'x-frame-options' => 'SAMEORIGIN', 'x-litespeed-cache-control' => 'no-cache', 'x-robots-tag' => 'noindex', 'x-turbo-charged-by' => 'LiteSpeed', 'report-to' => '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=VpR69Ey2hbz
    [Apr 28 12:09:29] Starting cron with normal ajax at URL https://www.-----URL-REMOVED-----/wp-admin/admin-ajax.php?action=wordfence_doScan&isFork=0&scanMode=limited&cronKey=7d36680a47533f9c3f5f09c15e983486&signature=02d545ab364df9917841d29e62eeef63a78d422d006101ccbff54215cf84f91d
    [Apr 28 12:09:29] Scan process ended after forking.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support wftiffany

    (@wftiffany)

    Hi @kenrichman,

    Thanks for reaching out to us.

    We couldn’t find a diagnostics report from you–can you send another one to wftest @ wordfence.com? You can find the link to do so at the top of the Wordfence > Tools > Diagnostics page. Then click on Send Report by Email. Please add your forum username (@kenrichman) where indicated and respond here after you have sent it.

    Thanks,
    Tiffany

    Thread Starter kenrichman

    (@kenrichman)

    Ok that’s been done.

    Plugin Support wftiffany

    (@wftiffany)

    Hi @kenrichman,

    Thanks for sending the diagnostics over!

    It seems that the LiteSpeed server is stopping Wordfence from completing the scan. The LiteSpeed web server has been known to kill or stop processes that take more than a few seconds to run. It does not stop these processes gracefully but simply kills them silently. You can read more about this here: https://www.wordfence.com/help/advanced/system-requirements/litespeed/

    To prevent this, you need to make a simple change:
    1. Find your site’s main “.htaccess” file. This file usually exists in the document root directory where WordPress is installed.
    2. Open the file with a text editor.
    3. Find the line that says “# BEGIN WordPress” and add this code above it:

     # BEGIN LiteSpeed noabort
     <IfModule rewrite_module>
     RewriteEngine On
     RewriteRule .* - [E=noabort:1]
     </IfModule>
     # END liteSpeed noabort

    This will instruct LiteSpeed not to abruptly abort requests. It should allow your site to update correctly, allow Wordfence scans to run to completion, and it will also allow any backup plugins on your WordPress site to function without problems from timing out.

    Let me know if this resolves the issue.

    Thanks,
    Tiffany

    Thread Starter kenrichman

    (@kenrichman)

    I had already tried this but tried it again just in case. Unfortunately this does not solve the issue. I have also tried setting a noabort directive as this is another suggested fix. I’ve tried all of the suggested fixes, and that is why I am here on the support forum. The hosting company have also tried looking into Litespeed but not found an issue. I will tell them what you say but as it doesn’t work I don’t know what else to do. I have other sites that work fine with WordFence on the same server.

    Thread Starter kenrichman

    (@kenrichman)

    My hosting company have also tried this:

    <IfModule Litespeed>
    RewriteEngine On
    RewriteRule .* - [E=noconntimeout:1]
    RewriteRule .* - [E=noabort:1]
    </IfModule>
    

    they added: This will disable Litespeed connection timeouts for that particular site, and if this is indeed the problem, this will resolve it.
    However, it has not resolved it

    Thread Starter kenrichman

    (@kenrichman)

    Still no resolution to this issue

    Plugin Support wftiffany

    (@wftiffany)

    Hi @kenrichman,

    You can bypass the LiteSpeed “noabort” check since the “External Application Abort” function is set to “No Abort.”

    You can enable this global option so that Wordfence will skip checking for “noabort” in your site’s .htaccess file. You can read more about this here: https://www.wordfence.com/help/dashboard/options/#bypass-noabort

    Let me know if that resolves the issue.

    Thanks,
    Tiffany

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.