• Resolved wmbweb

    (@wmbweb)


    My Wordfence scans keep failing. At first I was getting the “Server State” caution sign. When I received the “Scan Failed. The previous scan has failed. Some sites may need adjustments to run scans reliably. Click here for steps you can try,” I tried a bunch of those suggestions. Now I don’t get the Server State caution sign, but now I get “Scan failed: Unable to query database.” What do I do now?

    I switched to Bluehost a short time ago.

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

    (@wfpeter)

    Hi @wmbweb,

    I haven’t seen any recent cases of Wordfence being unable to query the database but I would make an assumption that your site either doesn’t have the necessary permissions to perform database operations, or the database is unavailable at certain points when the scan starts which could point to intermittent problems.

    I will try to see if there are any configuration issues if you send a diagnostic report to wftest @ wordfence . com. The link to do so is 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.

    Thanks for reaching out.

    “Unable to query database” means quite simply that Wordfence can’t reach the database. Since these connections originate from your website on your server, normally that means the site can’t get there either and the site wouldn’t be visible either (though arguably this is not always the case). It could also be some query limitations your hosting provider has imposed on database connections (I don’t remember BH doing this but that’s not definitive) or network connectivity issues between the web server and the database server if they are hosted on different servers.

    To make sure I’m not missing something, Can you send a diagnostic report 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 where indicated and respond here after you have sent it.

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

    Also, I’d like you try some steps and run a new scan.

    • Kill the existing scan if it is still running (The “Start New Scan” button turns in to a “Stop” button while the scan is running)
    • Go to your Scan > Scan Options and Scheduling page and locate the “Performance Options”
    • Set “Maximum execution time for each scan stage” to 20 on the options page
    • 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
    • Copy the last 20 lines from the Log (click the “Show Log” link) or so of the activity log and paste them here

    Regarding the last instruction in the list, I’m trying to see the last 20 lines before the scan fails. The scan make take a little longer to complete so please be patient.

    Tim

    Thread Starter wmbweb

    (@wmbweb)

    Peter, I have sent you the report. I haven’t done the instructions from the second email yet.

    Thread Starter wmbweb

    (@wmbweb)

    Tim,
    I followed your instructions and emailed you the scan report. Let me know what you find out. Thanks.

    Thanks for sending those.

    I took a look at the scan log and it seems like the last scan (on the 18th) did complete.

    Wed, 18 May 22 16:46:24 +0000::1652906784.8473:1:info::Scan Complete. Scanned 21637 files, 13 plugins, 2 themes, 105 posts, 26 comments and 17392 URLs in 6 minutes 15 seconds.

    I found the site is a Premium one and enrolled in Wordfence Central, our free security management tool, and saw that the scan today (May 20th) completed as well.

    If things are working now can you follow these steps?

    • Go to the Tools > Diagnostics page
    • In the “Debugging Options” section uncheck the option to “Enable debugging mode”
    • Click to “Save Changes”.

    All the other options can stay the same.

    Just to let you know, as a Premium license holder you have access to a private one-on-one ticketing system. If you are unsure how to access it I have linked to this video for your convenience.
    https://youtu.be/NLswn9SkNY0

    Tim

    I’ve the same problem with my website, I have sent you the report. I haven’t done the instructions from the second email yet.

    ABqlc

    Hi Support!,

    I am also facing the same issue. I have sent the report by email and @wfsupport I have also followed your instructions.

    Please open your own posts for your issues.

    Thanks
    Tim

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Wordfence Scan failed: Unable to query database’ is closed to new replies.