• Resolved islp

    (@islp)


    Hi, I found the following in my debug.log file:

    [11-Aug-2021 05:23:12 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query DELETE FROMwp_optionsWHEREoption_name= '_transient__wpmem_hidden_posts' made by require('wp-blog-header.php'), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, do_action_ref_array('pre_get_posts'), WP_Hook->do_action, WP_Hook->apply_filters, WP_Members->do_hide_posts, WP_Members->get_hidden_posts, WP_Members->hidden_posts, get_transient, delete_option

    Is this something I should worry about?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    A deadlock occurs when two (or more) db transactions mutually hold a request for locks.

    WP-Members doesn’t request locks on the db, and I’m uncertain as to whether WP does.

    The db transaction that is likely happening at the point of this error (at least from where WP-Members is concerned) is the transient that holds the IDs of hidden posts is being rewritten. When the transient is checked, if it is expired (if it is more than 5 minutes old, in the present version), then a query is run to get hidden posts, the old transient is deleted, and a new transient is created.

    That by itself wouldn’t (shouldn’t?) cause a deadlock, but if you had something running before it that did, that would be the reason.

    If it’s a “one-off” and doesn’t occur again, then you can ignore it. The hidden posts transient will be updated the next time it is checked.

    Thread Starter islp

    (@islp)

    Ok, thanks for the kind explanation ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘query in debug.log’ is closed to new replies.