WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Akismet] Won't Clean up the comment meta details (21 posts)

  1. TDF
    Member
    Posted 3 years ago #

    The last version of Akismet 2.5.1 or maybe even the previous one won't clean up the comment meta details in DB after deleting a comment.

    I woke up one morning and after checking my DB I realized that it is doubled in size. I started to rewind my thoughts on what I recently did and of course, after every WordPress update, Akismet was rolling out update too.

    I quick glance at the DB and I realized that commentmeta table was enormous. Akismet should store comment details there until they're deleted or approved but in my case it was failing to do so. The records were remaining there.

    I've deactivated and deleted Aksimet and reinstall it again, but the problem stayed.

    So I had to manually delete around 25.000 records from my commentmeta table in the DB.

    http://wordpress.org/extend/plugins/akismet/

  2. Joseph Scott
    Member
    Posted 3 years ago #

    I believe 2.5.0 may have had this issue and that it was fixed in 2.5.1. Can you double check that 2.5.1 doesn't do this for new comments. It is possible that it isn't cleaning up older comments processed under a previous version.

    Also you can try the development version of the plugin, files available at https://plugins.svn.wordpress.org/akismet/dev/ - with the warning that this is a development version.

  3. TDF
    Member
    Posted 3 years ago #

    I've checked again and 2.5.1 is not deleting akismet history from commentmeta table. Comment meta details processed under previous version were manually deleted by me as I previously said.

    I would not rather try the development version.

    One note: Imagine what could bug like this one (not deleting entries in DB when it should) do to a blog with 2.000 posts, 100.000 comments and 10.000.000 pageviews per month.

    This only tells me that Akismet is rolling out not thoroughly tested updates. You could, will and probably did serious damage to some people.

    But on the other hand, Akismet is the best anti-spam plugin out there.

  4. Joseph Scott
    Member
    Posted 3 years ago #

    We do quite a bit of testing of the Akismet plugin, including on very large sites with numbers much bigger than the ones you list. Of course we do from time to time find bugs and release updates, that is the nature of software.

    If you can outline the steps involved in reproducing this I'll be happy to take another look at it and track down what is going on.

  5. Josť Cuesta
    Member
    Posted 3 years ago #

    I am having the same problems here. Even dropping and recreating the table don't fix it.

  6. TDF
    Member
    Posted 3 years ago #

    Which steps involved in reproducing this you're looking for @Joseph?

    There are no steps. Akismet 2.5.1 keeps storing the entries in commentmeta table. Simple as that.

    akismet_as_submitted, akismet_result and akismet_history

  7. Joseph Scott
    Member
    Posted 3 years ago #

    Yes, Akismet keeps a history in the commentmeta table. For comments that are marked as spam and then deleted automatically after 15 days then the commentmeta entries for those comments should be getting deleted as well.

    If the concern was over just that Akismet stories meta data about comments in the commentmeta table, that isn't a bug, it is a feature :-)

  8. TDF
    Member
    Posted 3 years ago #

    Jesus Christ...!!!

    @Joseph are you really authorized to response on these posts on behalf Aksimet, or you're just a random guy who just doesn't have a clue what he is talking about or you just intentionally undermine the intelligence of the people experiencing difficulties with Akismet.

    I suppose Akismet history should be kept in commentmeta table until the comment is deleted or approved.

    THE PROBLEM IS THAT AKISMET HISTORY IS STILL IN THAT TABLE AFTER DELETING OR APPROVING THE COMMENTS.

    Just to repeat this again in case you don't understand:

    Akismet won't clean up the comment meta details after deleting a comment.

  9. Joseph Scott
    Member
    Posted 3 years ago #

    This is why I asked for steps on how to re-create the problem you were seeing.

    Since I still haven't seen a list of steps, I'll piece together one from what you have mentioned:

    - New comment is submitted
    - Akismet marks it as spam
    - You specifically delete the spam comment in wp-admin
    - The commentmeta data for the spam comment you just deleted is still there

    Does that fit what you are seeing?

  10. TDF
    Member
    Posted 3 years ago #

    And what kind of feature is that, that will double the size of your DB overnight.

    Version 2.5.0 was bugged. After upgrading to 2.5.0 commentmeta table was pumped up with 23.000 records.

    After upgrading to 2.5.1 (in which you claim you've fixed the bug) those records stayed and new were being added daily disregarding if comments are deleted or approved.

    So I deactivated Akismet, deleted the files completely from the server, removed manually all the records from the commentmeta table and installed Akismet again.

    The problem remained. Commentmeta table grows no mater if I delete or approve the comments marked as spam by Akismet or held for moderation by WordPress (according to my settings).

  11. TDF
    Member
    Posted 3 years ago #

    Never mind.

  12. Joseph Scott
    Member
    Posted 3 years ago #

    Did you figure out what was happening?

    I'm happy to help track down and resolve bugs/issues once I am able to reproduce the problem.

  13. dannoll
    Member
    Posted 3 years ago #

    I'm having the same exact experience as @Vlatko. I Would love to know what's going on and how to fix it.

    UPDATE: This appears to be fixed in the latest version of Akismet (2.5.3), which I have installed. However, I'm wondering what sort of query I can run on the wp_commentmeta table to clear ONLY the unneeded records from it that were generated by this bug.

  14. Karine
    Member
    Posted 3 years ago #

    Same here, I would like to clear wp_commentmeta (8Mo and I only have ~2500 comments, wp_comments is 1Mo, I've only had ~40 spams total)

    Any idea how to do this? I don't really know which records are necessary... Thank you :)

  15. dannoll
    Member
    Posted 3 years ago #

    @ka-ri-ne: Try:
    DELETE FROM wp_commentmeta WHERE comment_id NOT IN (SELECT comment_id FROM wp_comments)

    I found the query referenced in the discussion here:
    http://wordpress.org/support/topic/akismet-update-caused-huge-database-size-growth?replies=36

  16. Karine
    Member
    Posted 3 years ago #

    Thank you for the answer Dannoll, actually, I had already used this query but it only found 32 orphaned entries...

    I'd like to empty the table but I'm not sure what's required or not, is it an important table ? All I see is akismet_'something'

  17. dannoll
    Member
    Posted 3 years ago #

    @ka-ri-ne, I had similar results, but it was at least a good start. If you find a better, more complete answer, please post it here. I'd like to know.

  18. bitkahuna
    Member
    Posted 3 years ago #

    dannoll, thanks for the query - i had over 2500 orphaned rows in a wp setup! made the db a lot smaller. :)

  19. Omid Korat
    Member
    Posted 3 years ago #

    Use this code to remove Akismet history form your database:

    DELETE FROM wp_commentmeta WHERE meta_key LIKE '%akismet%'

  20. smazsyr
    Member
    Posted 3 years ago #

    Guys, I'm a fellow sufferer. Does anyone know for certain if simply purging all records in wp_comentmeta is OK?

    I have 40,000+ non-spam comments and sure a shoot don't want to hose those.

    Also, can anyone confirm the queries above from Dannoll and Omid are the right way to go?

  21. Omid Korat
    Member
    Posted 3 years ago #

    I understand that you can't trust every code! But I assure you that code will only remove Akismet history and don't corrupt your database.

    But of course you have to backup your database so you can restore it if anything goes wrong.

Topic Closed

This topic has been closed to new replies.

About this Topic