WordPress.org

Ready to get started?Download WordPress

Forums

Fatal error: Out of memory (allocated 30408704) (23 posts)

  1. steheap
    Member
    Posted 3 years ago #

    I'm trying to use the auto upgrade to 3.2.1, and get the following error as soon as the upgrade process starts:
    Fatal error: Out of memory (allocated 30408704) (tried to allocate 3981531 bytes) in /homepages/23....

    I've searched for similar issues and have seen the references to php.ini. I'm hosted in a "Professional Linux" plan with 1and1, and I understand you can put a php.ini file in the various folders, although it only impacts the folder it is installed in and no subfolders. I created one, and put it in the main site folder and the plugins folder. I also added the suggested line to the config file as per these instructions:
    "THIS TO BE ENTERED IN THE WP-CONFIG FILE WHICH IS IN THE ROOT OF THE WORDPRESS SETUP:

    ENTER AFTER:
    define('ABSPATH', dirname(__FILE__).'/');

    THE FOLLOWING:

    define('WP_MEMORY_LIMIT', '64M');

    I ALSO CREATED A PHP.INI WHICH I UPLOADED TO THE PLUGIN FOLDER IN WP-CONTENT:

    memory_limit = 128M; Maximum amount of memory a script may consume (64MB)
    max_execution_time = 45;
    upload_max_filesize = 10M;
    post_max_size = 20M; "

    I tried again and got the same error and so I have backed these changes out. I am running some plugins - the main one being the WP eStore plugin from HQ Tricks.

    Questions:
    Should I disable the plugins before trying auto upgrade?
    Could I do a manual upgrade rather than auto?
    Is it possible the SQL database needs splitting (that is what 1and1 said even though it is only 3M or so.)
    Anything else I am missing about running this with 1and1 - I just noticed that my Global PHP version was "4" which I have just changed to "5" but I'm not 100% sure what that actually does.

    The site is operational, so I don't want to break it.

    Steve

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    Should I disable the plugins before trying auto upgrade?

    Yes. ideally you should do this before all core upgrades - not just when you have memory problems. Also try switching to the Twenty Ten theme. And you have backed up your database, haven't you?

    Could I do a manual upgrade rather than auto?

    It won't make any difference in this situation.

    Is it possible the SQL database needs splitting

    Unlikely - given its size.

    You MUST also upgrade to PHP and MySQL 5 before attempting an upgrade.

  3. steheap
    Member
    Posted 3 years ago #

    Yes, I backup the database weekly, although have never tried to do a reload from the backup. I use a plugin for that. PHP is 5.2.17 and I am on MySQL5.0.

    My fear in disabling plugins and trying the upgrade again is that it will partially complete and leave me without a working site. Is that likely once it starts?

    Any other thoughts?

    Steve

  4. esmi
    Forum Moderator
    Posted 3 years ago #

    Is that likely once it starts?

    It's possible but fairly rare. It's still all fixable as long as you have a good database backup. Your PHP & My SQL versions are fine.

    The only other thing I can suggest is to contact your hosts and ask them if they can temporarily extend your PHP memory allocation to allow to to complete the upgrade. It is in their best interests to ensure that you keep WordPress up to date. I realise that you have tried to increase the PHP memory yourself but the methods suggested don't always work with every host. Sometimes it requires a change at the host level.

    Longer term, you shouldn't hit the same problems as - from WP 3.2 onwards - updates are only partial and should consume far less memory.

  5. steheap
    Member
    Posted 3 years ago #

    I contacted 1and1 about assigning more memory and got this back:

    The memory limit on your current shared hosting package is limited to 30MB only. You may max out the memory limit by creating a php.ini file and put this line of code:

    memory_limit = 30M

    Then upload the php.ini file to the directories where you want the file to take effect. Please do understand that due to resource limits on our Shared Hosting machines, it is not possible to allocate more than 30M of memory to PHP via the memory_limit directive, although phpinfo() may report a higher number. While you may specify more than 30M for the memory_limit PHP directive via a php.ini or .htaccess file, the server will not allocate more than 30M."

    Would I be able to do the manual upgrade to 3.2.1 with this amount of memory?

    Steve

  6. BurtJessop
    Member
    Posted 3 years ago #

    I have the exact same problem (as Steve above) on my self-hosted web site at 1and1.com! They at least gave Steve the reason that there is a problem with this working at the 1and1.com hosting site.

    Does this mean that to do an automatic update of WordPress to version 3.2.1, that we have to go to a different provider that will have a higher self-imposed Memory limit than 30 Meg for PHP running?

    Steve, What WordPress plugin are you using to do automatic updates of your WordPress database. Thanks.

    What new Hosting provider do you recommend other than 1and1.com that will not put such a low limit on PHP Memory Allocation?

    Thanks,
    Burt

  7. steheap
    Member
    Posted 3 years ago #

    I use "WordPress Database Backup" to make my weekly database backups. I think that is the question you asked?

    I still haven't tried to make the upgrade - I am not 100% sure that a manual upgrade with 30M of memory will work, and have not managed to find confirmation of this. I understand it will work fine once the upgrade has taken place.

    I don't particularly want to move away from 1and1 as I have a lot of URLs and sites all hosted in one package. It would be a lot of work to shift, and, apart from this glitch, they have been reliable.

    Anyone know if the manual upgrade takes more than 30M of memory?

    Steve

  8. BurtJessop
    Member
    Posted 3 years ago #

    Steve,

    Thanks for the info on what plug-in you are using to do your database backups.

    I am trying to convince the support people at 1and1.com to increase the memory in their basic packages for PHP Memory Allocation, but I am not currently having much success with this endeavor. This is what they said:

    "That is our PHP memory limit in the current package that you have. If you do wish to increase your PHP memory limit, you can upgrade your package to one of our Dual Linux hosting packages. Dual Basic = 60 MB"

    This seems to me like a poor business decision on their part, and they may loose customers for it.

    I don't know what the minimum Memory Allocation would be to Automatically Upgrade WordPress. Do you or anyone else have any idea?

    Thanks,
    Burt

  9. westerfunk
    Member
    Posted 3 years ago #

    On 1and1 host myself ... after getting this error and troubleshooting for a while, what finally worked was disabling all of my plugins, I ran the upgrade, and it worked.

  10. steheap
    Member
    Posted 3 years ago #

    Great news. Now will Burt or I try the upgrade next?

    Steve

  11. BalticFlyFisher
    Member
    Posted 3 years ago #

    I have also got the same problem with 1&1 (*ß?%$!), but I've been holding back on doing the upgrade because some of the plugins I use haven't been validated against WP 3.2. Cant afford for my site to be down, so I might just have to upgrade to another 1&1 package.

    Stui

  12. BalticFlyFisher
    Member
    Posted 3 years ago #

    I just got a lengthy but pretty useless reply from 1and1 - basically all they gave me was a link to the php params for my hosting contract. Strangely enough mem_limit=90M for php 4.4.9 and php 5.2.17.

  13. BurtJessop
    Member
    Posted 3 years ago #

    Hi,

    I just deactivated every one of my plugins and then did an automatic WordPress install. This time it worked OK. They I reactivated all of my plugins and everything seems to be back the way it was before - working well.

    Thanks,
    Burt

    http://Burt.Better-You.com

  14. steheap
    Member
    Posted 3 years ago #

    Me too - everything went very smoothly!

    Thanks for all your help

    Steve

  15. imstewart
    Member
    Posted 3 years ago #

    Hi, I had the same problem and managed to fix the problem similar to Burt but I just deactivated a number (3) of the bigger plugin's and managed to upgrade.

    PS: I am also a 1 and 1 user...

  16. BalticFlyFisher
    Member
    Posted 3 years ago #

    I checked out the php params on 1&1, and I had 90MB associated with the hosting package, so theoretically that shouldn't have caused the problem. I ended up by upgrading manually, it worked fine.

    stuart

  17. DVDfever
    Member
    Posted 3 years ago #

    I haven't tried deactivating all my plugins yet (just about to do a full backup first) but I, too, am on 1&1 and I haven't the first idea what they're talking about when they tell me about a 30M limit, yet the 3.2.1 file is about 3.79Mb in size. I try and email them but they may as well be replying in Japanese when the reply comes in.

    I have a 1&1 Professional package for which I'm paying £19.99/month plus VAT and they've replied with the following and pointed to a list of alternative packages, but while some of them that allow more php memory are cheaper, they don't seem to have all the features of the package I'm now, so I'd lose out there. And the alternative would be a server package at a completely ridiculous £50/month plus VAT.

    "The error which you have encountered is basically cause by the outage of the php memory limit that is supported on your package. If you wish to increase the php memory limit so that you will not encounter an issue upgrade your wordpress site I suggest you to upgrade your package to dual advance which gives you 60 MB php memory or dual unlimited which gives you 80MB memory limit."

    I just want to update WordPress and this is breaking my brain.

  18. relish1227
    Member
    Posted 2 years ago #

    Had the same problem... deactivating all of the plugins and then doing the upgrade worked!

    Thanks everyone!

  19. gift.hinter
    Member
    Posted 2 years ago #

    I just registered here just to pitch in my cent's worth. I spent a good number of hours following link after link of tips and solutions for the memory allocation error when I tried to upgrade from WordPress 3.1 to WordPress 3.2.1.

    None of the solutions that I found ever worked.

    I tried increasing the memory limit using the various methods suggested (php.ini, .htaccess, wp-config.php). None worked.

    I tried deactivating all my plugins in one batch. That didn't work.

    I tried deactivating my plugins one by one. That didn't work either.

    I was just half an inch close to manually upgrading. But, then, I realized that maybe the theme (Suffusion) I'm using could be causing the bottleneck. So, I switched back to the Twenty Ten theme, clicked the upgrade button, and voila! Upgrade succeeds. After that, I switched back to my previous theme.

    I have not yet checked whether the theme switch and/or the successful upgrade broke anything. If ever, I'll head back here.

    I'm not sure if this issue is specific to Suffusion, but just in case you tried the other solutions and none works, try the second-to-the-last resort that I used (i.e., reverting to a stock WordPress theme). The last resort, of course, is manual upgrade.

    And, oh--I also noticed that a lot of folks experiencing this issue are customers of 1and1. I'm on 1and1, too. If that means anything, this memory allocation error could not be 1and1-specific either.

    I hope this helps.

  20. esmi
    Forum Moderator
    Posted 2 years ago #

    I'm not sure if this issue is specific to Suffusion

    No it wasn't. Running out of memory is the combination of many factors - including the theme & plugins that you are using.

  21. booblla
    Member
    Posted 2 years ago #

    I know this is a bit off topic, but what host in this day and age has a 30MB memory limit for PHP?

    I only pay $2.95 a month (I pay triennially hence the hefty discount) for my hosting and they impose a 256MB memory limit for PHP.

  22. ignlg
    Member
    Posted 2 years ago #

    I'm with 1&1, in the same situation as many of you. I've fixed many memory issues with my own php.ini file with a memory limit directive:

    memory=20MB

    One at the wp root directory and one at the wp-admin directory. It works in many cases.

    Hope it helps.

    @booblla: what hosting company?

  23. pnaw10
    Member
    Posted 2 years ago #

    I know it's been awhile since anything in this thread, but I wanted to clarify some of the confusion which seemed to arise earlier in the post: the file size of the WordPress upgrade has NOTHING to do with the "30M limit" imposed by 1and1.

    The 30M limit is how much memory PHP is allowed to use for running scripts at any given time. Think of PHP scripts being called by your wp-admin, by anyone browsing your site, by plugins that you use and even any calls to WP Stats (if you're using it).

    I am running three different websites on the basic 1and1 account -- one included domain and I pay separately for the other two domains. I'm sure that's not helping much either.

    I also ran into a problem with the WP 3.1 upgrade with the biggest of my three sites (the smaller 2 upgraded fine), and wound up doing it manually via FTP since the auto wouldn't work. Since then, every version after has auto-upgraded without a problem.

    But still, on my biggest site, the admin dashboard will usually only load partially -- some of the blocks just say "loading..." and I got the "fatal error: out of memory..." error on the last block on the left column. The right column doesn't even load. And I can't get any "extended" stats (30+ days) to load either.

    I'm about ready to move to another hosting service that offers more than 30M of PHP memory... WordPress and all the bells and whistles I use are definitely "outgrowing" my current 1and1 account.

    I know better service will cost more, but I don't want to see my bill take a significant leap higher -- any recommendations on hosting providers?

Topic Closed

This topic has been closed to new replies.

About this Topic