One of our client sites periodically (for around 2 to 5 minutes) zooms to 90%+ cpu usage for php.exe
We have tracked down which IIS virtual site is causing this, but how do we resolve the problem - or -
is there a way we can constrain the php.exe to use only a small percentage of cpu so we can at least keep it "caged up" in the meantime?
Welcome. 🙂
What software is that vsite running? Is it running a flat-based php board or anything? Also, what version of PHP?
It's running a small "shopping cart" type application using MySQL database. The PHP is version 4.2.2
Oooh. Is it a custom-built shopping cart or is it something like Agora (pre-made)?
it's a small custom-made app for ordering pizza (selecting choice of ingredients and size of the pie, etc.)
Ah. Okay. Is there anywhere the script isn't "optimized?" Any by optimized, I mean, is it doing unnecessary db queries, etc. For example, SELECT * instead of SELECT price, ingred, etc Any loops that are unnecessary can also drive up the load.
I can't debug their code - we didn't write it. What I asking really is are they any settings either in PHP or the server that we can enable to constrain what they are doing until such time as they fix the code themselves
Okay. Hrm. I know that their are some 3rd-party tools for *nix but I don't know about Windows.