Wordpress/PHP Help

So my ISP tells me that the the Wordpress PHP script on my index file is apparently causing excess CPU usage (I’ve been quarantined to a special server, evidently). I know next to nothing about these issues, so I’m wondering if any savvier technical minds out there than mine have some theories. Could it be that regular site traffic calling the index page has exceeded some sort of limit my ISP has for CPU usage? Site traffic continues to grow every month but hasn’t had any extraordinary spikes lately. Is it possible that there’s some kind of bug or other glitch in the PHP script that’s generating excess loads on the CPU? Other ideas? This problem is evidently serious enough that my ISP is threatening to cut me off in seven days if I don’t figure this thing out. I guess maybe all the prayers of Avery’s critics have started working.

Update: Thanks for all your emails and suggestions. With your help and Google I’m pretty sure my problem is a good one, insofar as nothing is “wrong” per se, just that my traffic is heavy enough and WP’s PHP infrastructure creates usage demands such that I’m bumping up against my ISP’s CPU limits (as opposed to data transfer limits, which hasn’t been a problem and shouldn’t be, as many of you point out). Soooo, after an evening of Googling and searching and reading deep in the bowels of virtual geeekdom, I’ve made some tweaks, namely uploading a plugin that WordPress gurus swear by (wp-cache) as a way to make my ISP’s CPUs think I’m running a static page. Ideally, this will show some results over the next few days and get me out of the leper colony and back into the good graces of my ISP. Stay tuned.

Later update: you may have trouble posting comments for a day or so while I sort out my server issues. Be patient. Things should sort themselves out soon enough.

Email this Post

Trackbacks & Pings

  1. Web Hosting » Comment on Wordpress/PHP Help by bguy on 15 Nov 2007 at 6:28 am

    […] You can read the rest of this blog post by going to the original source, here […]

Comments

  1. bguy wrote:

    hi, Christine Kane said you were having some problems… (i’m her we’bguy’ - i handle her we’blog’)

    first off, i can tell you that bad programming can cause excessive CPU usage. this may not be the first thing i would bet is wrong, but it is the first thing that pops in my head.

    any kind of dynamic (performed in real time) tasks that PHP does, can potentially get bogged down by an infinite loop or trying to continue a task regardless of failure (like failing to connect to a remote server - it will try a few times) or simply the sheer size of the task (like a database query that inadvertently pulls way too much info).

    if the problem really is PHP (WordPress), i would look at plugins first to find a culprit there. plugins are often not fully tested, or they are released with the disclaimer “alpha version” - which at least advertises that it’s not fully tested. they may also conflict with each other.

    next, i would look specifically at the index.php file and find any code where PHP performs a task that uses looping or remote connection (displaying an image that lives on another server IS a remote connection and is VERY frowned upon because you use up their bandwidth for your gain). if i had my hands on the code, i would do a few things to time each task execution - but i won’t discuss that here cause it’s too tecky-geeky. even simple HTML calling for a remote image can create the same problems (after all, PHP is HTML when it’s sent out to the visitor).

    now… aside from PHP/WordPress coding issues… i notice that you refer many times to your ISP in regards to your website. well, your ISP = Internet Service Provider…. they provide you with your “internet service” NOT “web hosting”. it’s like thinking of your phone company as your landlord… which is CRAZY… UNLESS your ISP also HAPPENS to provide web hosting services as well (providing a place to store and serve your website).

    if we set aside the idea that you ISP has anything to do with this (regardless of whether they are the same entity) and focus on the who you really mean to refer to, you Hosting Provider, we can look at some other possibilities.

    there are many levels of web hosting. a “server” is a “label” for: a computer that stores files remotely and allows other computers to make remote connection requests that ask for various files (primarily HTML web page files) and “serves” them to the requesting computers. just like all the other computers, it can be built with different hardware and have different levels of performance.

    any particular server (low/high performance) can act as a server for one website, a few websites, a lot of websites, or a WHOLE LOT of websites. when you put mulitple websites on the same server, all those websites must SHARE EVERYTHING about that computer — especially CPU and RAM.

    “shared hosting” is usually very cheap $5-12 per month or so. invariably, shared hosting servers are MUCH slower — they are MUCH more prone to resource shortage (ex: CPU and RAM), MUCH more prone to application crashing (MySQL database for example). they often have limitations to try to alleviate this and distribute equally to all of the sites on the server — which really means your website is served up more slowly ALL OF THE TIME (think of your car, capabale of 100+ MPH limited to 35 MPH on a 2-lane city road). and to make money, the hosting providers must CRAM as may websites as they can on each server.

    i guarantee if your hosting provider is calling you out on CPU usage — you’re on a shared server. otherwise, the CPU would be yours alone to get as much out of it as you could - you could “floor it” so to speak.

    but because you’re on a shared server, your site may simply be generating enough traffic and/or making other requests that exceed your measly slice of the CPU pie. it may not have anything at all to do with bad PHP WordPress code (plugins or not), but a lot more to to do with bad web hosting service (or, at the least, “get what you pay for” web hosting service). in other words, your same site on another server may not have any issues AT ALL — AND WITHOUT CHANGING A THING — if it were on a “higher quality hosting level”.

    if you’re using some free service from your ISP (if they so happen to provide that — and some do, like BellSouth) you are REALLY in trouble. for obvious reasons, the free stuff is the cheapest and the lowest peformance.

    so you have 2 things to look at…
    1) find exactly where WordPress is generating content or performing a task that is a HUGE task (it could be behind the scenes)
    i looked at your main page and there is NOTHING on the surface that could even remotely cause it. also, i don’t want to burst your bubble, but you would have to generate a LOT of traffic — i mean MAJOR traffic — to exceed the CPU limitations… (unless the CPU limitation was small)
    (i doubt your problem is #1)

    2) just what level of web hosting service do you have?
    the answer to this question is verly likely the answer to the problem…

Post a Comment

Your email is never published nor shared. Required fields are marked * Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

*

*