WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: podpress] Has the Duplicate Key error truly been fixed yet? (6 posts)

  1. fpmsummer
    Member
    Posted 2 years ago #

    Currently running version 8.8.10.12 on a couple sites running WP 3.2.1, and a couple sites still using 8.8.10.10 or 8.8.10.7.

    This duplicate key error has been an issue since way back in the earliest versions of podpress we've been using on these sites since 2005-2006.

    Example from the error logs:
    INSERT INTO wp_podpress_statcounts (postID, media, feed) VALUES (22687, 'Showfile.mp3', 1) ON DUPLICATE KEY UPDATE feed = feed+1, total = total+1;

    I read older posts in these support forums that said the problem had been resolved with updated versions, but I keep seeing the error no matter how up-to-date we've kept podpress.

    Is there a solution yet?

  2. ntm
    Member
    Posted 2 years ago #

    Well, I have added a patch in 8.8.5 which should have solved the issue with the duplicate key error.
    see http://plugins.trac.wordpress.org/ticket/1068

    Is INSERT INTO wp_podpress_statcounts (postID, media, feed) VALUES (22687, 'Showfile.mp3', 1) ON DUPLICATE KEY UPDATE feed = feed+1, total = total+1; the complete error message? It looks like db query string but with no message which says what is wrong with it.

  3. fpmsummer
    Member
    Posted 2 years ago #

    The full error, on several sites:

    WordPress database error Duplicate entry 'Showfile.mp3' for key 1 for query INSERT INTO wp_podpress_statcounts (postID, media, feed) VALUES (XXX, 'Showfile.mp3', 1) made by require, require_once, require_once, require_once, include_once, podPress_statsDownloadRedirect, podPress_processDownloadRedirect, podPress_StatCounter

    There may have been some other problem going on with that first bit of code I quoted... that's what started showing up as one of the high usage culprits when mysqld performance started sliding into the crapper. I'm not so sure they're related anymore, but I haven't ruled it out just yet.

    So any of my sites using at least 8.8.5 should not be throwing that error, correct?

  4. ntm
    Member
    Posted 2 years ago #

    The first query string and this one are not the same. This last one seems to from a podPress version older than 8.8.5 and the other one which includes the phrase ON DUPLICATE KEY UPDATE is from a more recent podPress version. This part with ON DUPLICATE KEY UPDATE is meant to avoid error messages like the one you has posted in the last post.

    So any of my sites using at least 8.8.5 should not be throwing that error, correct?

    Correct.

    But if you find error messages which contain query strings with "ON DUPLICATE KEY UPDATE" then please post them too.

    Thanks,
    Tim

  5. fpmsummer
    Member
    Posted 2 years ago #

    Will do. Turns out that the DUPLICATE KEY UPDATE started showing up in a different log because it was taking longer than usual to complete the query, 5-8 seconds or more.

    Any idea why that query would slow down so significantly when mysqld is under high stress (caused by other issues), moreso than other WP related queries?

  6. ntm
    Member
    Posted 2 years ago #

    Any idea why that query would slow down so significantly when mysqld is under high stress (caused by other issues), moreso than other WP related queries?

    No. But I'm no db expert.

    If you find an answer to your question and could make a suggestion on what should be done then I would be happy to see that your suggestion will find a way into the podPress code.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags