WordPress.org

Ready to get started?Download WordPress

Forums

index.php hogging resources - causing downtime (9 posts)

  1. csburdick
    Member
    Posted 3 years ago #

    I was on shared hosting and all of a sudden my host kept shutting down my account saying that index.php is hogging all the resources. I did everything I could - disabled non-essential plugins, ran W3 Total Cache fully set up, running a CDN, optimized as much as I could and it was still happening.

    I ended up switching to a new host on a VPS, optimized it even more, running memcached, etc, and the same problem is happening. The site keeps going down a few times a day, server reboots, and it's back up shortly.

    Why does this keep happening? I can't find out what's going on, I just keep seeing index.php taking up a ridiculous amount of resources over a few hours and shutting down.

  2. How much traffic are you getting when this happens?

  3. csburdick
    Member
    Posted 3 years ago #

    When it first started, I got a big spike on one article (14k uniques within an hour or so.) Server went down and this has been happening ever since. Regular traffic doesn't usually go past 3k/day.

  4. You're going to have to check what your server is doing, read the error log. While it's index.php that's the problem, that's sort of like saying something is wrong with your car's engine. That's a lot of possibilities ;)

    Figure out your memory usage, install cache software on the server (memcahce or APC can help), and talk to your host to help you get CPU/Memory down as low as possible.

    Personally I removed ClamAV and my server magically stabilized.

  5. csburdick
    Member
    Posted 3 years ago #

    I have memcached installed and I've been in constant contact with both hosts about what's going on and they can't seem to find the issue.

  6. At its most basic, the problem is you're having too much traffic for your server to handle. Yeah, that was me being Capt. Obvious ;)

    It sounds like you've done the normal things, though you may want to hire the w3Edge guys to see if they can optomize the heck out of your w3tc install. It's a tricky thing. I find that minifying js actually slows my site down. That said, make sure you have opcode caching on and set to memcache. Disk is best for some of the other settings.

    Also check out apache a bit mroe.

    http://thethemefoundry.com/blog/optimize-apache-wordpress/

    Prefork is notably weird, but if you tweak it right, you can drop load by a noticeable percentage.

    Sadly, this is all server side stuff, and every server is a little different.

  7. csburdick
    Member
    Posted 3 years ago #

    I'll do that - I appreciate the resource.

    However, I think this is more of an issue with WordPress in this case. I've never had a problem with 3000 PVs/day, and I think a VPS should be able to easily handle that, especially with a CDN and caching.

    Here's what the "Top Process" in my WHM says under Daily Process Log:

    User Domain % CPU Process Top Processes
    audisite audisite.com 81.0 /usr/bin/php /home/audisite/public_html/automoblog.net/index.php

    root 8.0 php /usr/local/wt_python/wt_monitor/exim_queue.php

    audisite audisite.com 74.0 /usr/bin/php /home/audisite/public_html/automoblog.net/index.php

    root 7.0 php /usr/local/wt_python/wt_monitor/exim_queue.php

    And this is the first entry under my Process Manager:

    Priority CPU % Memory % Command
    18 63.0 4.7 /usr/bin/php /home/audisite/public_html/automoblog.net/index.php

    Same thing, it's always that index.php file. There was another thing I found in WHM (I can't seem to now,) that showed a huge list of the index.php processes running (and perhaps not closing.)

    Also, there's nothing in my error log. There was on the old host.

  8. It's always going to show index.php, you know. I mean, everything gets parsed through it.

    I agree that WordPress is causing the issue, but given that a lot of us use it for sites that get even more traffic, it's likely that there's something else adding to the mix here.

    And when I say 'top', I mean log on to your server via SSH and run the command top.

    Top Processes doesn't really help that much.

  9. csburdick
    Member
    Posted 3 years ago #

    Ah, didn't realize everything's going to go through index.php - that sucks and makes it really tough to troubleshoot.

    Anyway, thanks again for your help.

Topic Closed

This topic has been closed to new replies.

About this Topic