• obscurant1st

    (@obscurant1st)


    Hi all,
    I have a site which gets like 2000 to 3000 visitors everyday and 1700 posts. It is being hosted on a VPS with 5vCPUs and 4GB RAM. the problem is the site is crashing every now and then. One thing I have noticed is the crash often occurs when I am writing new posts. The CPU is maxing out and the load becomes too high and then the server crashes. It is resolved if I restart apache.

    What I have done until now:
    1. disabled compression
    2. Disabled minifying from w3tc
    3. Using MAXCDN
    4. Using cloudflare to minify the js and CSS
    5. Removed the revisions from DB
    6. Removed the revisions feature by disabling it via wp-config.php
    7. Optimized and repaired the DB

    Can someone help me to find out where the issue could be lying? Or do you think if it is time to move to a dedicated server? I seriously doubt so considering I don’t have much traffic. Any help would be really appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Is it when you hit publish on a new post? Consider the plugins you’re using. Think about everything that’s going on when you publish a new post. For instance I have a site, when I hit publish on a post numerous things start to happen. The cached pages get cleared, the sitemap updates, the site pings Google and Bing, and the post gets sent out to numerous social media websites.

    I’ve also had this happen to me on a site similar to yours in size on its own 2GB vps (which I scale up and down as needed.)I use the free Webuzo control panel on that server. It has been awhile but I think I fixed it by tweaking the configuration of Apache, PHP and Mysql. First I would try increasing your available memory to php scripts in your php.ini to see if that helps if you haven’t already.

    Thread Starter obscurant1st

    (@obscurant1st)

    Its not just publishing which causes the crash, even saving the content sometime crashes the website. About the PHP.in edit how much do you think I should increase it to?

    I haven’t tried that so, going to try it right now! ??

    BTW thanks for helping me.

    Hi again, you’re welcome, not sure if that will be much help though. Just checking out some of the settings on that vps. I’ve done some updates to the vps since I’ve increased the php memory limit I think including updating to php5.4 and then reverting back to 5.3.

    This is what I have in my php.ini file, looks pretty standard.

    memory_limit = 32M ; Maximum amount of memory a script may consume (16MB)

    In my WP Configuration file though I have…

    define( ‘WP_MEMORY_LIMIT’, ‘256M’ );

    Using the TPC memory usage plugin, I have this info on the dashboard.

    Usage Sample: 70.91MB (28%)
    Peak Usage: 71.18MB (28%)
    All-Time: 158.53MB on 3/29/14 @ 7:00 am (shutdown)
    Load Averages: 0.3 0.35 0.25
    WP Memory Limit: 256M
    PHP Memory Limit: 32M

    Also have you setup swap space on your vps?

    I also had memcached setup on it for awhile and was using it for Object Caching in W3 Total Cache and I noticed it helped decrease load on the server but auto clearing the cache on updates was a little buggier.

    BTW, I just increased mine to
    memory_limit = 64M ; Maximum amount of memory a script may consume (32MB)

    It has been stable with the other setting though.

    At first I had similar problems with this vps/site as you’re having except it was mainly when I’d hit publish and set off a chain reaction of resource consuming events.

    Thread Starter obscurant1st

    (@obscurant1st)

    When I check the server had like 764MB memory for PHP. So I changed it to 512 MB.
    And yes I have swap space for the VPS.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘site hosted on a VPS with 4GB RAM crashes frequently’ is closed to new replies.