Support » Fixing WordPress » Out of Memory error

  • Hi

    I have been having problems with my website since the last wordpress update. I first noticed that any new plugins didn’t save their settings. Then I was unable to update my theme.

    The guys at Woocommerce checked their end and discovered that my website has a Out of Memory error repeating over and over.

    “2018-06-23T09:32:46+00:00 CRITICAL Out of memory (allocated 60817408) (tried to allocate 294912 bytes)”

    Even though the WordPress memory limit is currently set to 256MB, my site is running out of memory after using just 60MB.

    I have checked with my server host and there is no limitation on their end so WordPress is my last suspect.

    I have deactivated all my plugins and the problem remains. I also ran a scan with P3(plugin performance profiler) and none of my plugins were using excessive memory.

    So I am hoping some-one here can help.

    With thanks, Geraldine Fay

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 17 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Forum Moderator & Support Team Volunteer

    There are a number of places where you can try to increase PHP’s max memory. Try both wp-config.php and php.ini.

    https://docs.woocommerce.com/document/increasing-the-wordpress-memory-limit/

    Hi
    are you on shared hosting ?

    Thread Starter TotsBabyShop

    (@faydesigns)

    Hi Naveen, yes, I am on shared hosting.

    Geraldine

    Thread Starter TotsBabyShop

    (@faydesigns)

    Hi Steve, thank you for your reply.

    I already have PHP set to 256mb. Is that not the limit?

    Regards, Geraldine

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Forum Moderator & Support Team Volunteer

    Please show your PHP.INI. Did you also add a line to wp-config.php? If so, please show that line and tell us where you added it.

    Thread Starter TotsBabyShop

    (@faydesigns)

    Hi Steve,

    I increased the PHP over a year ago and haven’t made any changes to any files since.

    I don’t have access to my php.ini at the moment as I am away from home until later this evening.

    Regards, Geraldine

    Dion

    (@diondesigns)

    Your host may be limiting memory to PHP applications. This is becoming more and more common due to the immense CPU/memory requirements of some WordPress plugins (WooCommerce being a prime example). The plugins can cause slowdowns on other customers’ sites if they are allowed to consume, say, 512MB.

    If all the suggestions you’ve recieved have not helped, then I suggest you contact your hosting company, state what you’ve written here, and ask whether there is something they can do to help.

    Thread Starter TotsBabyShop

    (@faydesigns)

    Hi DionDesign, thank you for your reply.

    I have already checked with my hosting and there is nothing limiting their side. This only started after my last word press update.

    Regards, Geraldine

    Thread Starter TotsBabyShop

    (@faydesigns)

    Hi Steve

    Sorry for the delayed reply

    I can’t find a php.ini file anywhere, I also did a file search via cpanel and nothing was found.

    Regards, Geraldine

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Forum Moderator & Support Team Volunteer

    What is the define you have in wp-config.php regarding memory? Where in the file did you put it?

    Thread Starter TotsBabyShop

    (@faydesigns)

    Hi Steve

    These are the first few lines from the top of the wp-config.php file. This is the original file downloaded when I started my website and I have never altered them.

    <?php

    define(‘WP_MEMORY_LIMIT’, ‘256M’);
    /**
    * The base configurations of the WordPress.
    *

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Forum Moderator & Support Team Volunteer

    That looks good. Try adding this to .htaccess, too:

    php_value memory_limit 256M

    Thread Starter TotsBabyShop

    (@faydesigns)

    Thanks Steve, this is the htaccess file at the moment. Do I add it to the top?

    # BEGIN LSCACHE
    # END LSCACHE
    # BEGIN NON_LSCACHE
    # END NON_LSCACHE
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Forum Moderator & Support Team Volunteer

    AT the top is good.

    Thread Starter TotsBabyShop

    (@faydesigns)

    I saved the modified htaccess but get this error when I view my site. The error disappears when I delete the extra line

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator at webmaster@faydesigns.ie to inform them of the time this error occurred, and the actions you performed just before this error.

    More information about this error may be available in the server error log.

    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Out of Memory error’ is closed to new replies.