WordPress: Fatal Memory Error when Upgrading to 3.1.1 or 3.2

[UPDATE]  This also applies to 3.2.  I’m finding that I have to deactivate more and more plugins as time goes on.  I believe it is the UNZIP operation that is eating up so much memory.  But something awesome should occur after you get 3.2 installed…future upgrades are only going to update the changed files.  This means that the zip file should be a lot smaller.  In fact, I was able to update to 3.2.1 without deactivating plugins (NOT RECOMMENDED…but I do it anyway).

I tried upgrading my WordPress sites to WP 3.1.1 tonight, but got the following message on each one: Fatal error: Allowed memory size of 31###### bytes exhausted (tried to allocate 29##### bytes) in /home/???/????/wp-includes/class-http.php on line 1426

The quick and simple fix

A quick thing to try is to deactivate a couple of big plugins.

On one site, I deactivated PhotoSmash and it installed fine. Fearing that PhotoSmash was causing the problem, I tried deactivating NextGEN Gallery on my development site, and left PhotoSmash running, and it installed ok then too. Whew! It’s not PhotoSmash!

In case you’re wondering, I develop PhotoSmash, but also run NextGEN on my development site so I can stay compatible with the big kahuna ;-).

Memory Allocation on my Shared Host

The weird thing is that my shared host (1and1) allocates 250MB of memory — see screenshot to the right –, so theoretically (I think), the upgrade shouldn’t have pooped out until it hit that limit. UPDATE:  I learned that even though the server settings at the right shows I have a 256MB memory limit, that this is not true.  WordPress itself tries to set a higher memory limit, hence the indicator of 256M.  In reality, I’m limited to the 32MB allocated by my Web Host.   I keep encountering the error at around 31MB.

Cheers,
Byron

, ,

8 Responses to WordPress: Fatal Memory Error when Upgrading to 3.1.1 or 3.2

  1. Bobee July 7, 2011 at 11:35 pm #

    Exactly what I was looking for. Almost did a manual upgrade before finding this. Thanks a million!

  2. byron July 8, 2011 at 8:54 am #

    Welcome! Somehow, I need to get my host to bump up my memory allocation.
    BB

  3. jonh July 15, 2011 at 7:18 am #

    Hi byron,
    good post, though it didn’t work in my case. I looked up the issue, it seems deactivating plugins solves it for MOST people.
    I’m no running WordPress 3.1.1, with network activated (2 sites currently on the network).

    I tried deactivating all plugins (via the network admin site : i select all plugins, then select bulk action “deactive”), but it does not do the trick: I keep getting the exact same error that you mention :
    “Fatal error: Out of memory (allocated 28######) (tried to allocate 4###### bytes) in /homepages/##/####/####/wp-includes/class-http.php on line 1420.

    Any idea what could be the cause for this? Isn’t it supposed to work all the time if plugins are deactivated?
    Cheers

    Jonh

  4. Bill July 15, 2011 at 4:03 pm #

    I am getting an error as well with 1and1 but the error for only allocating 3.9MB and if that is accurate it does not seem to memory settings. I worked with a tech that seemed to know what is going on to increase memory in the problem directory but it still fails. Turning off all plug-ins was not help.

  5. byron July 18, 2011 at 9:21 am #

    Hey John and Bill,

    Sorry to hear you guys are stuck. Would love to hear back on what the problem was when you get it straightened out.

    I have no idea if this will help, but you might try switching to the default theme before upgrading.

    If that doesn’t work, you can always try a manual upload of the new WP files. Just don’t upload your wp-config.php or wp-content directory.

    It should perform an upgrade when it sees the new files.

    There’s a section on the manual upgrade here: http://codex.wordpress.org/Updating_WordPress

    Didn’t read it, so I don’t know if there’s anything helpful there.

    Cheers,
    Byron

  6. BP October 24, 2011 at 1:57 am #

    Hi Byron

    I saw on the other thread that you worked on EC-CS few years ago. So I thought may be you can help me. I am trying to reverse elimination entries posted by EC-CS.But system is not allowing me to reverse those entries because they are posted using doc type 21 and message says” Document type 21 cannot be used for manual posting. It can only be used in automatic consolidation functions.”

    What was your approach on reversing auto posted elimination entries?

    Thanks in advance for your help!

    Regards,
    BP

    • byron October 24, 2011 at 8:35 am #

      Hi BP,

      As you mentioned, it’s been a while since I’ve worked with EC-CS, but off the top of my head, here are a couple of possibilities:

      1) If Doc Type 21 is a result of the automatic eliminations, it might be that it just overwrites the previous records if you run it again. I’d have someone try it out in a Development or Test system first just to be sure, but maybe this is the answer.
      2) Is Doc Type 21 a result of the data monitor pulling in the current balances? If so, you might just be able to rerun the data monitor to overwrite those records.

      Hope that helps…

      Cheers,
      Byron

      • BP October 25, 2011 at 12:07 pm #

        Thanks Byron for a quick response.

        I went through many of your posts found them helpful. I would like to subscribe to this blog / website (not sure how can I do that), so that I can get alert if something new is updated.

        Thanks again for sharing the knowledge.

        -BP

Powered by WordPress. Designed by Woo Themes