Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.

Wordpress memory / load problem

Discussion in 'Wordpress' started by suggs, Feb 22, 2015.

Thread Status:
Not open for further replies.
  1. suggs United Kingdom

    suggs Retired Member

    Joined:
    Feb 2015
    Posts:
    288
    Likes Received:
    6
    Ive got a wordpress site where SOME posts are only showing half of the post and some only showing the post title where others show everything as normal.

    Ive got wordfence premium on it which hasnt picked up any hacks, nor have i noticed any files that have changed in the file manager.

    I am running on a shared hosting plan with heartinternet and the site is getting over 1000 visits per day, surely the shared plan can handle this number of visits??

    Looking at the logs it seems to be some sort of memory problem..

    PHP Fatal error: Out of memory (allocated 208142336) (tried to allocate 6291430 bytes) in xxxxxxxxx.co.uk/public_html/wp-includes/functions.php on line 377

    Ive tried increasing the memory via php.ini / wp-config htaccess but nothing seems to be working...

    Any suggestions welcome
     
  2. Domain Forum

    Acorn Domains Elite Member

    Joined:
    1999
    Messages:
    Many
    Likes Received:
    Lots
    IWA Meetup
     
  3. Skinner

    Skinner Well-Known Member

    Joined:
    Jul 2008
    Posts:
    4,616
    Likes Received:
    140
    260mb is quite alot for wordpress to be pulling, do you have any custom themes or plugins which could be rogue ? perhaps disable all the plugins and themes and see if it changes.
     
  4. suggs United Kingdom

    suggs Retired Member

    Joined:
    Feb 2015
    Posts:
    288
    Likes Received:
    6
    PM sent Steven
     
  5. Adam H

    Adam H Well-Known Member

    Joined:
    May 2014
    Posts:
    1,725
    Likes Received:
    267
    Disable all plugins, does the error still happen on those particular posts then ?

    If so, does it also still do it if you changed theme to a default theme and plugins off ?

    If in both cases its still the same what do those particular pages contain ? Is there any code executing which was not previously there ? Wordfence is good but its very dependant on how you've got it setup, you also have to remember that Wordfence can cause memory issues if not setup correctly too much like many plugins.
     
  6. dazc United Kingdom

    dazc Active Member

    Joined:
    Dec 2008
    Posts:
    300
    Likes Received:
    19
    I wouldn't bet on it. The php memory limit may have been restricted by the host?

    It wouldn't hurt to start looking at vps if you expect this level of traffic to continue.
     
    Last edited: Feb 23, 2015
  7. suggs United Kingdom

    suggs Retired Member

    Joined:
    Feb 2015
    Posts:
    288
    Likes Received:
    6
    It appears i have found the problem

    A certain plugin was had a broken html tag which was causing major problems.

    All sorted now.

    Really appreciate the help guys..
     
  8. suggs United Kingdom

    suggs Retired Member

    Joined:
    Feb 2015
    Posts:
    288
    Likes Received:
    6
    Little update here:

    I moved the site to a VPS and saw wp-cron.php was using a lot of resources. This file is called every time someone visits your site, which is ok for a site with a few hundred visits a day but anything more and it starts killing resources. I disabled it by adding
    Code:
    define('DISABLE_WP_CRON', 'true');
    to the wp-config.php file and instantly saw a difference. I then set up a manual cron job in cpanel.

    The site is still a little slow because im on the lowest package but am going to upgrade shortly.
     
  9. Admin

    Admin Administrator Staff Member

    Joined:
    Jun 2004
    Posts:
    11,120
    Likes Received:
    464
    Do you have a CACHE plug-in running?, they are supposed to help

    Admin
     
  10. Adam H

    Adam H Well-Known Member

    Joined:
    May 2014
    Posts:
    1,725
    Likes Received:
    267
    Disabling the cron is really just a bodge for not finding the cause of the issue. What have you done to optimise your VPS ? I assume your not running the VPS out of the box and have optimised SQL etc.

    Have you disabled plugins to see if there is a hold up in the resource usage ?
     
  11. dazc United Kingdom

    dazc Active Member

    Joined:
    Dec 2008
    Posts:
    300
    Likes Received:
    19
    It's default behaviour. He's done the right thing although, as suggested, serving up cached content to visitors would mitigate the problem to a large extent.
     
Thread Status:
Not open for further replies.