Skip to:

Buddy Press Memory Spikes

  • tim_marston



    I have an active BuddyPress community site. It has 2k+ members and most of the time works pretty well. But about 5 times a week the memory spikes massively and crashes my server.

    This is causing me all sorts of issues. My members all disappear and it take a while to reengage them. It is also stopping me from promoting the site as I don’t to invest until I know the issue can be resolved.

    I have had two experienced developers look at the site please tests have been from the tech team at my hosting company.

    All the searching done so far points to an issue related to buddy press. When we get lucky we can watch a spike happen in real time and see what is happening via the logs. We cant get any definitive info but we can see that the memory is being gobbled up by BP.

    The site is built from the following:

    • WordPress
    • Buddypress
    • S2 member pro
    • RT media
    • Plus more plugins.

    Having Googled this issue and read in the forums it seems like this fault is a fairly common one. (Unfortunately none of the info in the existing threads was much use).

    What I am hoping is that someone can advise me on how to track down this fault or if not advise me as to where to find someone who can fix it for me.

    I have been working on this project for a very long time and it would be great to get this fault fixed and move on to the next stage of expansion so any input would be greatly appreciated.

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

  • Ben Hansen


    how much ram does your server have? also how many concurrent users do you have at any given time? finally have you been or are you able to try isolating any of those other plugins?



    Could be many things.
    Is this a Shared Hosting, VPS, or dedicated? Show us your server stats so we know what’s not enough.

    With 2k+ users you might need more RAM and MAX connections increased or decreased in your PHP/WEBSERVER configs. Some webhosting services have some of the nastiest default settings around:(

    For example mine had a default of 64megs,4gb Storage, and 15 something max connections.
    Took me a few crashes to find out I was out of storage space and ram. I had to MODIFY it to 1 TB storage and 512mb RAM for my BP to run great.



    Thanks guys, on reflection I should have put my server info in my original question so my apologies for that.

    So we have an SSD VPS with:

    • Centos 6
    • Cpanel
    • 4 core processor
    • 4GB memory
    • 800GB data transfer

    I’m pretty sure it is not a server issue. Something is causing a memory spike that is way beyond normal usage.

    My hosts are really helpful, they have tried lots of tweaks but they are convinced it is a site issue and not a server problem

    The memory spikes can happen with as few as five members online.
    At most we have 30 members online at any one time.
    The more active the community the more frequent the crashes are.

    My developer has looked through every plugin to see if there are any conflicts, in fact he has done this a few times.

    I’m not sure about isolating plugins I will ask what has been done on this and post back asap.

    Note – I’m not technical, at all so I’m doing my best with my answers here as this lot is at the very limits of my knowledge and comprehension. 🙂



    Reply from my developer to the question “finally have you been or are you able to try isolating any of those other plugins?”.

    “Isolating plugins is actually the very first step we took in this type of process (fault-finding), then themes, etc. – all the way through until everything has been checked individually. All of this has been checked and re-checked (several times, by several people).

    Although we cannot find the problem *precisely*, everything points to
    BuddyPress media.”

    I should say that we’ve been looking at this fault for around a year now so its likely we’ve checked all the obvious issues.



    Although we cannot find the problem *precisely*, everything points to
    BuddyPress media.

    By ‘BuddyPress media’ do you mean RT Media ?
    Is RT Media running any cron jobs?



    Hi @shanebp thanks for commenting, no I tihnk that was just an error by my developer. Everything points to Buddypress and not RT Media but I will check the cron jobs and post back asap.

    How do your team think it’s related to BuddyPress? If you have data that suggests that’s the problem, can you give us the details, so we can look into it?



    I found one random cron job, it was nothing to do with BP or RT media, I deleted it but we just crashed again this morning.



    @djpaul thanks for join the thread. Here is a copy and paste from an email my host sent me:

    The other day whilst we were on the phone I was able to view the potential issue in realtime and I could see that there were a growing number of PHP processes being spawned on the server and the RAM consumption of each process kept increasing.

    I have attached a screenshot of my findings, although I do not recommend that you include this on any forum as it does include some sensitive information.

    The top left section of the screenshot displays the TOP output of your server. As you can see most of the entires were from the Phoenix user, and each process was consuming between 95-259MB of RAM each. This kept growing.

    The bottom left section was an Strace output from one of the PHP PID’s, which allows you to see exactly what a processes is doing. Each process referred to the same thing, which was something to do with buddypress.

    The top right section displayed entires from the access log in realtime. As we discussed I believe the buddypress plugin loads content dynamically without having to refresh the page, which would explain the low activity in the access log.

    The bottom right section was from the MySQL server. It displays the MySQL process-list, which was fine.

    Ideally I would first try to find a buddypress developer and then provide them with that output, as it may help point them in the right direction to find out why your site consumes too much RAM.

    Hopefully this may shed more light on my problems? Any help form anyone greatly appreciated.

    Henry Wright


    Hi @tim_marston

    Can you also provide a list of the rest of the plugins you’re running? I’ve used BP, s2member and RT Media (not all together I should add) and haven’t experienced memory issues. There could be something else going on so it’s worth having a list of everything you’re running



    Thanks @henrywright

    Here is the list:

    Admin Tweaks
    Advanced Excerpt
    Antispam Bee
    Bowe Codes
    BP Auto Activate Autologin Redirect To Profile On Signup
    Bp Clear Notifications
    BP Group Activities Notifier
    Broken Link Checker
    Buddy Press Activity Ads
    BuddyPress Activity as Wire
    BuddyPress Activity Comment Notifier
    BuddyPress Activity Privacy
    BuddyPress Block Activity Stream Types
    BuddyPress Live Notification
    BuddyPress Profile Visibility Manager
    BuddyPress Security Check
    BuddyPress Usernames Only
    Delete Expired Transients
    Email Login
    Facebook Like User Activity Stream For BuddyPress
    Google Analytics +
    Infinite SEO
    Insert Headers and Footers
    Mailjet for WordPress
    Menu Items Visibility Control
    OPcache Dashboard
    Post Voting
    Pretty Link Lite
    Query Monitor
    Random Banner
    rtMedia for WordPress, BuddyPress and bbPress
    rtMedia Pro
    s2Member Framework
    SearchWP bbPress Integration
    Social Likes
    Subscribe To Comments
    User Activity
    Wordfence Security
    WordPress FAQ Manager
    WPBakery Visual Composer
    WP Better Emails
    WP External Links
    WP Maintenance Mode
    WPMU DEV Dashboard
    WP Widget Cache

    Ben Hansen


    that’s quite a list i would definitely try isolating whichever of those you can to find out if any one or combination of them is/are the culprit(s).



    Hi @ubernaut thanks for joining the thread. My developers have gone through every plugin at least twice now and checked for any conflicts. Some have been added more recently (after the spikes started) and all the non-essential ones removed temporarily to see if the spikes stop. Also we have logs pointing to BP as the culprit. So Im not sure what else we can do? If I deactivate all the plugins the site wont work properly so I wont be able to get the activity needed to test if the spikes have gone or not. Unfortunately there are no easy options left to try which is why I started this thread, to see if anyone has nay other ways to track down the issue.

    Ben Hansen


    Actually I’ve been paying attention all along and was the first to reply but I’ve been letting the others who far more knowledgable than myself on such matters do most of the talking. FYI i don’t think your screen grab came through at least i cannot see it. So maybe as @djpaul said if you have evidence that BP is the culprit… but i suspect it is some combination of those plugins you have a ton of them, some of which i know i wouldn’t be using if i could help it (I’m a bit of plugin minimalist).

    Without seeing the screenshots you mentioned that your support team provided, we still don’t know if it’s a BuddyPress issue — or related to one of the many other plugins you have running. If you’d like, forward those screenshots to me (paul at this domain .org) and I’ll see if it’s helpful here.



    @ubernaut I agree it is a lot of plugins but they are all there for a reason. Some are useful for me as a webmaster and the rest do an important function in the community.

    The ones that aren’t essential we are pretty sure aren’t part of the problem as they have been removed during tests and the spikes still occurred. The essential ones cant easily be removed as the community wont work without them. So if we took them out the community would have enough activity to give the spikes a chance to occur (or not). Hopefully that makes sense and my logic is sound?

    Also am I right in understanding that when you say isolte plugins, you mean deactivate them and see if the fault still occurs?



    @djpaul thanks for the offer, I will email them as soon as I have made this post 🙂

    Quick Update – I now have more info. It is the Buddy Press Media folder that looks to be part of the issue. My developer doesn’t know if this a BP core issue or RT media issue (or some combo) in that we don’t know which takes priority within this folder.

    Hopefully that makes sense, I’m doing my best to explain this stuff whilst also trying to stop my head from exploding 😉

    Thanks — I’ve received your email.

    One of the windows is showing a bunch of “-1 ENOENT (No such file or directory)” entries for /plugins/buddypress-media/. Just because it says “BuddyPress” in its name doesn’t mean it’s BuddyPress itself. 🙂

    Can you remove this plugin and give it some time to see if your server crashes again?
    Ultimately I think you need to contact support for that plugin (I’m assuming it’s RTMedia), but removing it and testing should pretty positively prove one way or another if it’s related to that.

    If you can’t disable that plugin, then I think your only option is to talk to that plugin’s support team and hope they can figure something out.



    Thanks @djpaul Im beginning to learn that :-).

    Removing it would be far from ideal as images are a huge part of the activity in our community.

    I will speak to RT media and see if they can shed any light on this. Anything they say I will post back here in case other people have similar issues.

Viewing 19 replies - 1 through 19 (of 19 total)
  • The topic ‘Buddy Press Memory Spikes’ is closed to new replies.
Skip to toolbar