• Resolved grindlay

    (@grindlay)


    I had a message saying my site had exceeded disk quota. On investigation, my PHP error log was 10GB, the content was entries like the following, repeated thousands of times:
    [22-Mar-2022 10:47:35 UTC] WordPress database error DELETE command denied to user ‘user’@’localhost’ for table ‘wp_options’ for query DELETE FROM wp_options WHERE option_name = ‘auto_updater.lock’ made by do_action_ref_array(‘wordfence_daily_cron’), WP_Hook->do_action, WP_Hook->apply_filters, wordfence::dailyCron, wordfence::_refreshUpdateNotification, wfActivityReport->getUpdatesNeeded, wfUpdateCheck->checkAllUpdates, wfUpdateCheck->checkCoreUpdates, wp_version_check, do_action(‘wp_maybe_auto_update’), WP_Hook->do_action, WP_Hook->apply_filters, wp_maybe_auto_update, WP_Automatic_Updater->run, WP_Upgrader::create_lock, WP_Upgrader::create_lock, WP_Upgrader::create_lock, WP_Upgrader::create_lock, WP_Upgrader::create_lock, WP_Upgrader::create_lock, WP_Upgrader::create_lock, WP_Upgrader::create_lock, WP_Upgrader::create_lock, WP_Upgrader::create_lock,

    etc….
    I checked the DB privileges for the user and sure enough, the DELETE permission had been revoked (now fixed), but my question is, why the cascade of error messages – seems like a bug to me.
    I have the latest version of Wordfence installed.

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

    (@wfpeter)

    Hi @grindlay,

    The error messages that filled the PHP log are not generated by Wordfence, they were a byproduct as you rightly discovered by the database DELETE permission not being present at the time it was requested.

    If you visit Wordfence > Tools > Diagnostics > MySQL, you’ll see which privileges we require such as INSERT, UPDATE, TRUNCATE etc. here. The likely cause for so many lines in your log is because a Wordfence scan was running, which performs many hundreds (or thousands) of operations on your database during its runtime, but the server was unable to grant permission every time the plugin requested a DELETE to clear down some of the data.

    Thanks,

    Peter.

    Thread Starter grindlay

    (@grindlay)

    Understood, thanks for the reply Peter. May I suggest (as a dev request) that the WF plugin checks for DB errors, and if found, aborts the scan? I know that there can be many different DB errors reported, but it seems sensible to abort an operation rather than fill the PHP error log with ~ 10GB of messages, especially in environments where disk space may be at a premium.
    Cheers
    G

    Plugin Support wfpeter

    (@wfpeter)

    Hi @grindlay,

    We ran some further tests and it looks like DELETE is used as the fallback if DROP and TRUNCATE are both unavailable, however all of these were unavailable to you so looks like the scan tried to complete in the background anyway. I have suggested that the scan could fail and report back the reason in cases such as this. We do discuss all customer suggestions, but naturally can’t commit to delivery dates here on the forums.

    If you have further Wordfence questions in future, by all means start a new topic any time and we’ll be glad to help!

    Peter.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Wordfence error logging – possible bug with wp 5.9.2’ is closed to new replies.