Skip to:
Content
Pages
Categories
Search
Top
Bottom

How much PHP Memory should be allocated to BuddyPress?

  • Avatar of tonyzeoli
    tonyzeoli
    Participant

    @tonyzeoli

    Hi:

    I’m on a 1and1 Shared account and BuddyPress is crapping out with a Fatal Error when requesting over 30MB of Memory. 1and1 Shared allots only 30MB and you cannot assign more with the “define wp-memory-limit” function. Doesn’t work.

    Does anyone know what the proper Memory Limit setting is for BuddyPress? Unfortunately, this site is not as well documented as the WP site. Hopefully, it will get there.

    I’m thinking it’s got to be 64, 96 or 128. I’ll be migrating to MediaTemple, where the Grid service allots 100MB for $20 a month.

    Anyone have any ideas?

Viewing 20 replies - 1 through 20 (of 20 total)
  • Avatar of Hugo
    Hugo
    Moderator

    @hnla

    Well that will be plenty :) 64MB should normally be sufficient but it all depends on what is running. Does the Grid service make you pay a monthly fee to have a healthy PHP mem limit, bit unusual. If you can stretch to it I would get the basic starter VDS from them.

    Avatar of techguy
    techguy
    Participant

    @crashutah

    Did you try adding the memory limit in the php.ini? A lot of shared hosts will allow you to create your own php.ini and you can set it higher in there.

    The only time I’ve hit that error personally is during updates/plugin downloads. However, if your site gets any reasonable traction, you’ll want a new host.

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    You can try setting the memory limit via wp-config.php first:
    http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

    If that doesn’t work, then do what techguy says.

    Avatar of UmaBlu
    UmaBlu
    Participant

    @umablu

    Change the value you need in your php.ini file (if you have acces to this file on your server)
    on your server under memory_limit=
    Below is my actual configuration for my buddypress site

    ;;;;;;;;;;;;;;;;;;;
    ; Resource Limits ;
    ;;;;;;;;;;;;;;;;;;;

    max_execution_time = 60 ; Maximum execution time of each script, in seconds
    max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
    memory_limit = 256M ; Maximum amount of memory a script may consume

    Avatar of tonyzeoli
    tonyzeoli
    Participant

    @tonyzeoli

    Okay, I will try to add the php.ini file. I spoke to tech support at 1and1. They said even if you try to upgrade your php memory limit, they have it hard set to 30 MB. I used the “define” function in the wp-config file to set the memory limit, but I will try the php.ini file and see if that works. I’ve used it before and it’s worked for other sites, so maybe that’s the issue. My goal with this post though, was to get a handle on exactly how much memory BuddyPress needs to run efficiently at the base install level, with no content or users, and then understand why or why not it would need more memory based on new data in the database and increased user base.

    Avatar of tonyzeoli
    tonyzeoli
    Participant

    @tonyzeoli

    Okay, so I knew about the php.ini settings in my work with WordPress. Silly me…I thought using that trick wouldn’t change the setting on 1and1, since the tech support told me that they had it set to 30 MB. Well…guess what? It worked. I set it to 128 and voila…instant BuddyPress. @UmaBlu, @techguy – you were both correct to let me know to use the php.ini setting. Thanks for that. I put the ini file in the top level, so that it sets the memory limit for all sites in the shared folder. Working just fine now. Whew!

    Avatar of techguy
    techguy
    Participant

    @crashutah

    Took me a while to remember the php.ini too.

    The answer to how much memory is a hard one. Depends on so many factors including the server that your host is providing. No one can really answer it. That said, I think my test site is set at 128 MB and I haven’t run into any issues.

    Avatar of paulhastings0
    paulhastings0
    Participant

    @paulhastings0

    I’ve used !AND1 in the past for just regular WP installs (not WPMU or BP) and I wasn’t all that pleased with them. When I finally switched over to JustHost for my normal WP installs I was much more satisfied with their stability and faster pageloads in general. For my BP install I use RackSpaceCloud.

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    Have to admit slightly surprised Shared Hosting accounts can do this, but there you go! I have tested running BP as low as 2MB, loading, unloading plugins, running the site performing various basic tasks and it didn’t crap out at all. Anything above 64MB is likely to be fine for most situations your new limit would give a decent safety margin I would have thought.

    Avatar of techguy
    techguy
    Participant

    @crashutah

    I was surprised that shared hosts could do it too hnla. However, it’s a feature of cpanel and so that explains why it’s possible.

    As a side note, I started this group for BuddyPress hosting: http://buddypress.org/community/groups/buddypress-hosting/home/ It still could use some love from more people sharing their experience with various hosts.

    Avatar of tonyzeoli
    tonyzeoli
    Participant

    @tonyzeoli

    @techguy – I’ll visit the group and post my thoughts. Thanks.

    By the way, I also learned that you have to put the php.ini file in the root directory, and any other directory that runs php scripts, like wp-admin and possibly plugins. Once I put the php.ini file in root, the site worked, but not the admin. I put an additional file in wp-admin and was up and running again. So, php.ini, while it works, it must be placed strategically in root and dependent folders for it to over ride the host settings.

    Avatar of UmaBlu
    UmaBlu
    Participant

    @umablu

    well, i am glad to hear that your Buddy site is working now.
    Now verify that in your Cpanel, under Setings/Services you have PHP Confing option, and and if you find there something like this
    “PHP5 (FastCGI)
    All files with the extension .php will be handled by PHP5 FastCGI processes.
    FastCGI for PHP makes all your PHP applications run through mod_fastcgi instead of mod_suphp. This eliminates the overhead of loading the PHP interpretor on every hit. Since it is always in memory ready for the next hit, the responses will be generated faster.”
    Set fastcgi option if it’s available.
    It will boost up your site and also you will need only the php.ini from the root file.
    I don t know much about GoDaddy…
    My hosting is Hostmonster, and they let you to do a lot of things…

    Avatar of Pisanojm
    Pisanojm
    Participant

    @pisanojm

    My opinion 96 mb minimum…if you have a lot of plugins and traffic (mine is set at 128mb).
    I’m using this plugin with BP to help figure out usage and I hope it will help you too:

    http://wordpress.org/extend/plugins/wp-memory-usage/

    Avatar of UmaBlu
    UmaBlu
    Participant

    @umablu

    Uploading big files on your site by you or site users, like video files, need much memory, because a part of the file is stored in your server memory. Big files, much more memory.
    Well, i think that 128M RAM is ok if you will not upload big files.( more than 100M).
    Also, Wp Super Cache need much memory than other scripts…
    If you will get that memory error again, change the memory limit. (256 if possible)

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    Useful plugin Pisanojm wonder how much memory it consumes :)

    Avatar of techguy
    techguy
    Participant

    @crashutah

    @tonyzeoli
    Depends on your host if you need your php.ini everywhere. On most cpanel hosts, you can configure where the php.ini will be. Just search for php.ini (or maybe just php) and you’ll see where you can configure that so you only have one to update.

    Avatar of tonyzeoli
    tonyzeoli
    Participant

    @tonyzeoli

    @techguy, I just went through my 1and1 cpanel. It doesn’t give you that option. @umablue, with 1and1, the only way to switch to PHP5 is to use the “Add Handler” and “Add Type” strings in your htaccess file. 1and1 won’t fully switch to PHP 5 until end of Q3, according to their web site knowledge base. I’m using the strings, so I’m on PHP 5 already.

    I finally ran the Ning to BuddyPress importer. I had to turn off all other plug-ins in order to run it. Now that I’ve run it, I’m encountering a memory error on “Discussions,” which has a folder associated with it that’s 14 MB. Every where I turn with this Ning to BuddyPress migration there are issues. It’s quite challenging.

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    Have you followed the thread on the Ning importer, Boones still I believe actively thrashing out the workings of this plugin; I seem to recall some mention of splitting the json file or something to get around issues

    Avatar of tonyzeoli
    tonyzeoli
    Participant

    @tonyzeoli

    @hnla I have been following the thread, but it seems as if Boone’s been busy and he hasn’t been answering queries for a few days to a week. I’ve posted a number of times there and haven’t gotten a reply.

    I’m not sure about splitting the JSON file at this point. I know that he’s mentioned that before. I am going to try a few things. I think because we have some other plugins on the same hosted about on another install of wordpress, that might be the issue. Will try it and see.

    Avatar of tonyzeoli
    tonyzeoli
    Participant

    @tonyzeoli

    We’re going to try and split the 14MB JSON Discussions Group file and see if that works. Looks like on LINE 97 of the php file that runs the importer, we’re getting caught up on the JSON file. So…we thinking that this is what it could be.

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

You must be logged in to reply to this topic.