Skip to:
Content
Pages
Categories
Search
Top
Bottom

how to delete all pending friendship requests from DB?


  • ds123
    Participant

    @ds123

    hello …our site becomes unresponsive and stalls, runs out of memory and gives a fatal error by clicking on the friendship requests …. its probably cause this is huge now …how do i clear this out safely in mysql? this is urgent matter on live site any help would be greatly appreciated!

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

  • shanebp
    Moderator

    @shanebp

    Friend relationships, including pending, are stored in the _bp_friends table.
    If a request is pending, the is_confirmed field value will be 0.

    You could try making a backup of that table and then deleting all rows where the is_confirmed field value = 0.


    ds123
    Participant

    @ds123

    hi shane i really appreciate your reply such a relief to hear from someone who knows buddypress cold its a very scary thing messing with the database on a site that is so important

    …quick update i actually got the pending friend requests on my own account to display but still is extremely slow ….other than moving the site to a totally new server does deleting is_confirmed field value = 0 seem like a good idea to try in your opinion to speed it up ?

    this is not a dedicated server but is supposed to handle spikes its not on a cheap hosting plan its supposed to scale on demand…..really managed wordpress hosting

    in general is this friends table something that is going to get out of control if you have 50,000 members?

    …i already every couple months trim the activity table … buddypress changed over the years i’m not sure i need to do it anymore honestly but was absolutely necessary like 3-4 years ago do you have people deleting activity table on larger sites still?

    thanks for your help on my db situation and how to keep it running


    shanebp
    Moderator

    @shanebp

    Deleting is_confirmed=0 may help in the short term.
    Trimming other tables can help.

    It sounds like your site is having overall resource issues.
    And often ‘optimized for WP’ approaches don’t work for BP because you can’t use the same caching methods- ie. objects.
    You’ll need to talk to your host and find out exactly how resources are allocated and being used.


    ds123
    Participant

    @ds123

    ok thanks shane …i hope i can keep things on this service for at least another year … so you agree with trimming activity table are there any others that are safe to trim ? the only thing i really care about preserving are the friendships ..and about 1 year of stuff

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