• Since I upgraded from 2.7.1 to 2.8.4 a few weeks ago, I get errors like this one in my Admin interface :

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 92160 bytes) in /mnt/104/sdb/a/6/www.ready.to.get/wp-includes/class-simplepie.php on line 2441

    It is not a big issue as long as it is for example the WordPress news feed on the dashboard. But when it comes to uploading pictures (max. 200 kB) or activating plugins it becomes really a pain. There are even some posts I cannot open anymore to edit them.

    Since I cannot get more memory for my blog hosting (the 64M hack in wp-config does not seem to work), what can I do ?

    Is the only solution a downgrade to a lighter WordPress version, like 2.7.x ?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter Juscher

    (@juscher)

    Oh I forgot an information that may be important : on the same domain, I am hosting 2 WordPress blogs. Maybe I should remove one ? That’s not very nice, but maybe there is no other solution…

    Don’t downgrade WP; that opens you to more problems. I don’t know about two WP installs and memory usage.

    Other thing to try is upping the memory allocation in a different way, like this line

    php_value memory_limit 64M

    in .htaccess.

    You can run phpinfo to see what kind of memory allocation you already have. Make a plain text file and call it phpinfo.php and put just this line in it:

    <?php php_info(); ?>

    then put the file in the root of your server, and then go to that file with your web browser. You’l see all the php info you need; scroll down for memory settings. If you get an error, that means your server company won’t allow phpinfo to run for security reasons.

    Thread Starter Juscher

    (@juscher)

    Thank you songdogtech.

    I first tried php_info, but apparently it is not implemented on my host:

    Fatal error: Call to undefined function: php_info() in /mnt/104/sdb/a/6/www.ready.to.get/phpinfo.php on line 1

    Then I would like to try your advice with php_value. Do I have to create the .htaccess first, or is it already somewhere ?

    Hah. I had the function wrong; it’s phpinfo not php_info. A WordPress function name influenced goof. Try it again and see what the memory is like.

    Your .htaccess file is in the top level of your WP install, alongside the top directories like wp-admin, wp-includes, etc. If you have permalinks other than default, it will be there. The dot in front of the name – .htaccess – means it’s a normally invisible file,
    so you need to use an FTP program – like Filezilla for Windows, or Cyberduck on a Mac – to see and edit the file. (Unless you’ve got some sort of file browser at the host service.) Put the line

    php_value memory_limit 64M

    near the top of it.

    Thread Starter Juscher

    (@juscher)

    Ok thanks now it worked with phpinfo(). Indeed I have a memory limit :

    memory_limit 32M

    I will try the .htaccess hack at home (here at work I have only a web-based ftp client), and tell you if it brought any change ! πŸ™‚

    Yea, try php_value memory_limit 64M and see what happens. I don’t know if htaccess can really override a hard server setting, but it’s worth a try.

    Thread Starter Juscher

    (@juscher)

    Actually I do not have a .htaccess file. Is it a problem if I have to create it ?

    If you have permalinks set for anything other than default, you will already have an .htaccess file in the directory with your wp-includes, etc. But if not, create one with your FTP client, becuase that will make sure the file is created with the correct character encoding. Then just put that line php_value memory_limit 64M in, because maybe you can get 64M out of it.

    Thread Starter Juscher

    (@juscher)

    I tried to create a .htaccess file with the line php_value memory_limit 64M in it, on the root directory of my wordpress installation. But it did not work : internal server error 500 when I try to refresh any page (admin or the homepage of the blog). Guess the server does not allow a .htaccess on root directory…

    Actually it would be nicer to have a lighter version of wordpress again, which would work fine with 32 MB of memory…

    500 errors can be a result of wrong character encoding in the htaccess file. Are you on a linux server or windows server?

    Thread Starter Juscher

    (@juscher)

    It seems like it is a linux server, because I also have errors like this on my homepage :

    Warning: Unknown(): open(/mnt/104/sdb/a/6/www.ready.to.get/sessions/sess_ee4ef2999ddbb83eb713299bcc4c70ac, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

    Should I not use UTF-8 ?

    That looks to be another memory error. I don’t know what might cause that, but disable plugins and see if that makes a difference.

    And your htaccess should be UTF-8 No BOM, or Latin 1 Windows, with Unix line breaks

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

The topic ‘Memory errors with 2.8’ is closed to new replies.