Skip to:
Content
Pages
Categories
Search
Top
Bottom

Recount gets stuck on "Counting topics to which each user has replied"


  • blogher8
    Participant

    @blogher8

    Hi All,

    I hope you can help.

    I am trying to do a recount (BBPress 0.9.0.4).

    What happens is that the first few items in the Recount list get done. Then the system goes to

    “Counting topics to which each user has replied…”

    And gets stuck there.

    I tried not checking the box for “Count topics to which each user has replied”, and when I do this, the Recount function goes through every item in the list and satisfactorily completes it. But if I check this one single box (or all of them), it always gets stuck on this step.

    I have tried deactivating all plugins and the problem persists.

Viewing 8 replies - 1 through 8 (of 8 total)

  • blogher8
    Participant

    @blogher8

    If anybody has any suggestions, I would appreciate it. I realize it may be related to some setting my host needs to adjust. Or perhaps a permission?


    blogher8
    Participant

    @blogher8

    If anybody has any suggestions, I would appreciate it. I realize it may be related to some setting my host needs to adjust. Or perhaps a permission?


    _ck_
    Participant

    @_ck_

    This may happen if you have a very large number of topics/posts/users.

    The functions in bbPress 0.9 are very inefficient and use a horrifying number of queries that will get blocked by many servers or timeout after 30 seconds.

    I wrote some experimental fast replacement routines, let me see if I can find them.


    _ck_
    Participant

    @_ck_

    This may happen if you have a very large number of topics/posts/users.

    The functions in bbPress 0.9 are very inefficient and use a horrifying number of queries that will get blocked by many servers or timeout after 30 seconds.

    I wrote some experimental fast replacement routines, let me see if I can find them.


    blogher8
    Participant

    @blogher8

    Thanks, _ck_!


    blogher8
    Participant

    @blogher8

    Thanks, _ck_!


    _ck_
    Participant

    @_ck_

    Okay I had never written the special routine for “topics to which each user has replied” so it never even appeared in the last 0.9 although Sam incorporated some of my other improved queries.

    But I sat down and wrote it just for you now :-)

    http://bbshowcase.org/plugins/fast-recount.zip

    Basically the old 0.9 bbPress api loops through each and every user and does a few queries for each one, completely overloading any server and timing out and never finishing.

    ie. 6 queries per user x 1000 users = 6000 queries !!!!

    My version accomplishes the exact same results with only a handful of queries right inside the mysql engine regardless of how many users, so it should always finish in under 30 seconds (unless perhaps it’s millions of users)

    Once you install and activate, under your recount menu you will see (among others)

    FAST RECOUNT topics to which each user has replied

    So check that box and leave the old one unchecked.

    Until I have some time to fix the order in which the boxes appear, you should probably do the fast recount AFTER the other regular counts are done.

    Oh and last but certainly not least, I highly recommend backing up your mysql database for wordpress/bbpress before using this plugin, because it’s experimental and does actually delete old data before creating the new data. Something could go wrong (in theory you could run it a second time to fix the problem but always best to be safe).

    ps. make sure you update bbpress to 0.9.0.6 too


    _ck_
    Participant

    @_ck_

    Okay I had never written the special routine for “topics to which each user has replied” so it never even appeared in the last 0.9 although Sam incorporated some of my other improved queries.

    But I sat down and wrote it just for you now :-)

    http://bbshowcase.org/plugins/fast-recount.zip

    Basically the old 0.9 bbPress api loops through each and every user and does a few queries for each one, completely overloading any server and timing out and never finishing.

    ie. 6 queries per user x 1000 users = 6000 queries !!!!

    My version accomplishes the exact same results with only a handful of queries right inside the mysql engine regardless of how many users, so it should always finish in under 30 seconds (unless perhaps it’s millions of users)

    Once you install and activate, under your recount menu you will see (among others)

    FAST RECOUNT topics to which each user has replied

    So check that box and leave the old one unchecked.

    Until I have some time to fix the order in which the boxes appear, you should probably do the fast recount AFTER the other regular counts are done.

    Oh and last but certainly not least, I highly recommend backing up your mysql database for wordpress/bbpress before using this plugin, because it’s experimental and does actually delete old data before creating the new data. Something could go wrong (in theory you could run it a second time to fix the problem but always best to be safe).

    ps. make sure you update bbpress to 0.9.0.6 too

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar