AVH First Defense Against Spam
[resolved] Database error Duplicate entry (6 posts)

  1. FYI, getting lots of these php errors:

    WordPress database error Duplicate entry '625524330' for key 'PRIMARY' for query INSERT INTO wp_avhfdas_ipcache (ip, spam, added, lastseen) VALUES ('625524330', 0, '2013-05-13 09:55:14', '2013-05-13 09:55:14') made by require('wp-blog-header.php'), require_once( [...]


  2. petervanderdoes
    Plugin Author

    Posted 2 years ago #

    This happens when the spammers hammer your site. Sometimes they try to post withing one second, the first write to the database hasn't yet completed when the 2nd write is performed.

  3. petesky
    Posted 2 years ago #

    Hello !

    To avoid this error (while being hammered) :-)

    $result = $wpdb->query($wpdb->prepare("INSERT DELAYED INTO $wpdb->avhfdasipcache (ip, spam, added, lastseen) VALUES (%s, %d, %s, %s)", $ip, $spam, $date, $date) ON DUPLICATE KEY UPDATE ip='$ip',spam='$spam',... );


    Maybe you can update the files , thank you

  4. petesky, this would be good to try; what's the complete code chunk? I tried to adapt what you posted but got errors.

  5. petervanderdoes
    Plugin Author

    Posted 2 years ago #

    I just released v3.6.1 with the above fix.

  6. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • AVH First Defense Against Spam
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.