WordPress.org

Ready to get started?Download WordPress

Forums

[closed] After updating wordpress I get fatal error message, can't log into wp-admin (20 posts)

  1. lorenrb
    Member
    Posted 3 years ago #

    I've seen a similar problem posted here but couldn't find the topic again, here is the message I get when trying to access wp-admin:

    Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 122880 bytes) in /home/lorenrb/public_html/wp-admin/includes/dashboard.php on line 351

    I asked my friend who owns the server and he replied:
    kk, sometimes if you get that just do a hard refresh (control + f5)

    I can't seem to do that as I use a mac.

    Any advice would be most helpful, it works when running 3.1 but would like to be able to update.

    Thanks in advance!

  2. jaydenl
    Member
    Posted 3 years ago #

    That's definitely not a fix. Doing a hard refresh in Firefox on the Mac is done by pressing Command + Shift + R.

    Will post if I find the solution, as I have the exact same issue with the exact same bytes in the error.

  3. jaydenl
    Member
    Posted 3 years ago #

    Boy I have trawled through dozens of blogs, posts, fixes - nothing can solve this?!

    My issue occurred when I went to do the auto update to what I assume is the latest WordPress. I can no longer log in to the dashboard. I can see the login screen, and it can deny my entry if my password is wrong - but when I successfully log in - I get this and I can do NOTHING about it:

    Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 122880 bytes) in /wp-admin/includes/dashboard.php on line 695

    It's clearly not a memory issue. 262144 bytes = 0.25 megabytes. 122880 bytes = 0.12 megabytes.

    Doing a phpinfo in that directory shows my memory_limit to have a Local Vaue of 128M and a Master Value of 64M.

    I have removed all plugins. I don't see a need to remove front-end themes, as the blog is still functional on the front-end.

    Due to no help available on this issue I see no option but to request my server admins to perform a full account restore from the most recent backup. Luckily this isn't on a frequently updated blog :\

  4. lorenrb
    Member
    Posted 3 years ago #

    I have just reinstalled 3.1 and I'm going to settle for that until somebody else figures this out. I'm getting my hosting for free so I'm not really in a position to be complaining too much, I find 3.1 satisfactory.

    I will keep tabs on this post in case somebody else finds out what's up however.

    cheers

  5. cabassi
    Member
    Posted 3 years ago #

    I tried to upgrade and am having this same problem. When I try to sign into the Dashboard, I get this message:

    Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 122880 bytes) in /home/jasoncab/walkingdeadcast.com/wp-admin/includes/dashboard.php on line 351

    Can anyone help?

    Thanks,
    Jason

  6. jaydenl
    Member
    Posted 3 years ago #

    Unfortunately I could not find any help on this 3 days ago :( I had to ask my host to revert to a previous backup. Hopefully there's more help about it now...

  7. healersla
    Member
    Posted 3 years ago #

    I'm having the same issue after an upgrade from 3.1.4 to 3.2.1. I'll try to roll back the upgrade but would (obviously) prefer if a solution is found... Please post if you have an idea...

  8. Dirty Bill
    Member
    Posted 2 years ago #

    WP is oddly silent on this issue. Even a little hope would be good. I want to know where is the 256k limitation is coming from...

  9. esmi
    Forum Moderator
    Posted 2 years ago #

    What 256k limit? WordPress doesn't impose memory limits. Your hosts do. Try increasing the memory available to PHP:
    http://wordpress.org/support/topic/253495#post-1017842

  10. Dirty Bill
    Member
    Posted 2 years ago #

    Hosting my own thx. Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 122880 bytes) 262144 / 1024 = 256k
    My php.ini mem limit is set to 128M, in default_constants.php WP mem is set to 64M.

    Nowhere is 256k set as a limit, yet the error displays it as a limit that is being violated.

    50% of the ram and 100% of the swap space on the server is available so what gives?

  11. esmi
    Forum Moderator
    Posted 2 years ago #

    Try contacting your hosts. WordPress does not impose any PHP memory limits.

  12. Dirty Bill
    Member
    Posted 2 years ago #

    Yo ESMI, you aren't reading the issue. I am the host. WordPress is making the request...cease trolling.

    To everyone else: I tried commenting out these lines in admin.php:
    if ( current_user_can( 'manage_options' ) )
    @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );

    Dashboard loads. This is a poor and temporary solution, but it does give you access to the backend.

  13. Peter Butler
    Member
    Posted 2 years ago #

    Bill, I think you're going to need to be more clear. The vast, vast majority of WordPress sites are hosted by someone, so it's not unreasonable for esmi to suggest (twice) that you check with your host. Are you implying that you are actually in complete control of your server, from start to finish - like, on a colocated server, or at least a vps?

    If removing the admin memory limit filter resolved your problem, maybe you should be looking into the themes/plugins you have installed? Sounds like one of them is probably setting the memory limit.

    Maybe try grepping 'admin_memory_limit' in your content directory to track down the issue?

  14. Dirty Bill
    Member
    Posted 2 years ago #

    Well, I don't know any other definition of host. I run a cloudserver (rackspace) - amd64 debian (squeeze) 512MB/20gb that hosts only this single installation that I'm having trouble with.

    The memory issue came out of the blue, site has been running great with WP_MEM (previously) set at 32M and PHP capped at 128M, no new plugins, no new themes, now can only access the dashboard if I turn off the memory filter in admin.php.

    It's apparent from the sheer number of these threads that I'm not the only one with this issue, or the question about the 256k error message.

  15. esmi
    Forum Moderator
    Posted 2 years ago #

    cease trolling

    Abuse of any users in this volunteer staffed forum is not tolerated. I suggest that you try to calm down and respond is a reasonable and mature manner.

  16. Dirty Bill
    Member
    Posted 2 years ago #

    Wasn't abuse esmi. I don't know you, your response was aggressive, wasn't trying to start anything, just trying to solve a problem.

  17. Peter Butler
    Member
    Posted 2 years ago #

    Have you tried defining WP_MAX_MEMORY_LIMIT? It looks like the default setting for that constant is 256m, which should be enough, but maybe playing with it would give you some indication of where the problem is.

  18. Dirty Bill
    Member
    Posted 2 years ago #

    I've played with it, no difference in the issue. It looks like anything that makes a memory_limit call (in wordpress) as in admin.php triggers the php error.

  19. Peter Butler
    Member
    Posted 2 years ago #

    Alright, here's what I'd do if I were in your shoes (recognizing that this approach is incredibly hamfisted, and there's a VERY good chance it will break your site while it's in there. Use at your own risk).

    First, get yourself logged into the admin section, using whatever technique you have to (commenting out the line you specified before, from teh sounds of thigns).

    Once you're logged in, and looking at the dashboard, uncomment the line that allowed you to log in, open wp-includes/plugin.php, and add this block at about line 171:

    if(is_admin()){
    				echo "<!--";
    				echo "FILTER $tag ".ini_get('memory_limit');
    				echo "-->\r\n";
    				}

    So the whole thing (starting at about line 166) ooks like this:

    do {
    		foreach( (array) current($wp_filter[$tag]) as $the_ )
    			if ( !is_null($the_['function']) ){
    				$args[1] = $value;
    				$value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args']));
    				if(is_admin()){
    				echo "<!--";
    				echo "FILTER $tag ".ini_get('memory_limit');
    				echo "-->\r\n";
    				}
    			}
    
    	} while ( next($wp_filter[$tag]) !== false );

    Keep this open, because you're going to want to remove it shortly. Now - refresh the dashboard, and view the source - you should have a list of filters, and what the PHP memory limit is when each of them are fired. Figure out where your memory limit goes from 32M to 256k, and you should have a starting point for your search.

    Again - this is absolutely use-at-your-own-risk. There's a very good chance it will break something in your site, so be ready to remove it as soon as you get the info you need.

  20. Dirty Bill
    Member
    Posted 2 years ago #

    Thanks Peter, I will try this out and report back.

Topic Closed

This topic has been closed to new replies.

About this Topic