Support » Plugin: Contact Form 7 GetResponse Extension » Deadlock error in cf7-extension.php

  • Hi, I’ve got this wp database error message: [Deadlock found when trying to get lock; try restarting transaction] DELETE FROM wp_options WHERE option_name = ‘vcgr_show_notice’
    In the end of this file: cf7-getresponse\cf7-extension.php are the two code lines:

    delete_option('vcgr_show_notice', 0);
    update_site_option('vcgr_show_notice', 1);

    This code will be executed when the file will be included while loading the plugin (and the other plugins)
    I changed the code and put the two lines in a function. Now the code will called through the action hook ‘plugins_loaded’ and this seems to work – no deadlock error anymore:

    function vcgr_update_show_notice(){
      delete_option('vcgr_show_notice', 0);
      update_site_option('vcgr_show_notice', 1);
    }
    add_action ('plugins_loaded', 'vcgr_update_show_notice');
    • This topic was modified 2 years, 7 months ago by Tom.
  • The topic ‘Deadlock error in cf7-extension.php’ is closed to new replies.