CGI/High CPU usage
Looking for some advice and suggestion.I'm on a dedicate server and I only have to 2 cgi script. One is for mail and the other is a topsite script.
For the last few months since I had these 2 scripts, it hadn't been a problem at all since CPU was average 3.5 or so base on service status. Again since I'm the only one on the server I don't consider it a problem at all.
Lately in the last week or so, the CPU usage has now average or gone up to 40-50 CPU which crashes my server. Rebooting it doesn't seem to do much good as it'll go right back up.
I do know for a fact that the high CPU is coming from the topsite script. As soon as I rename the topsite script, the CPU goes back under 1. Now I know that CGI is a resource hog and kills CPU usage but the thing is that I never really had this kind of problem from the topsite script before. It's just that within the last few days-last week that the topsite list has been acting up and killing the CPU. To me it's just kind of abnormal that the script is fine for the last few months and then all of a sudden starts acting up.
So I'm asking for any suggestion as to what could have cause this or if there's a way to limit and have the topsite script shutdown once it reaches a certain CPU usage?