News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

CPU overload from Simple Machines

Started by Flavious, January 12, 2010, 07:01:38 PM

Previous topic - Next topic

Flavious

I need some immediate help, and we are willing to pay! We have an extremely busy Simple Machines site that is having problems and this is the middle of our busy season!

The CPU on the server keeps getting overloaded. Clicking most parts of SMF and it just sits and spins saying "waiting for server". My hosting provider keeps saying it is a php script from simple machines that is using 100% of the CPU.

If you can help, please contact me asap.

Kill Em All



My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Flavious


Kill Em All

Take a look at both of those links, using a lot of those tips will help.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Flavious

Well it's getting worse. At a random time, someone will respond to a thread. Once the do, that thread appears to send the CPU into hyper overdrive, making the site inaccessable. If I can isolate the thread and delete it, everything is fine. Sometimes I have to hunt it down in the DB and delete it there, then run all the forum maintenance to straighten everything out.


Kill Em All

Is this on a dedicated server or a shared hosting server?

Who are you hosting with?


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Flavious

Shared, but only 1 of a handful of sites on that box - aqhost.com

stfox100

Also, ask your host which process is using all the CPU. Index.php? index.template.php?
Is your RAM and MYSQL use also unusually high?

Tyrsson

PM at your own risk, some I answer, if they are interesting, some I ignore.

Flavious


Flavious

#10
Quote from: stfox100 on January 18, 2010, 04:21:29 PM
Also, ask your host which process is using all the CPU. Index.php? index.template.php?
Is your RAM and MYSQL use also unusually high?

As far as they are telling me, just index.php and it's just the cpu.
Thanks for the responses guys... losing my mind on this thing.

If I didn't mention it before.. I can look at the Last Post in a board that is locked up from the home page. If I then go into the database, I can delete that post and sometimes it clears everything up. If not, I have to delete the whole topic, then do all the maintenance stuff, and finally repair the DB from MySQL and it clears it up.. for awhile.

Hope any of this helps.

Tyrsson

Have you checked the support topic for this mod? It may have already been covered there as well as a fix posted. A link to the support topic can be found on the mod download page.
PM at your own risk, some I answer, if they are interesting, some I ignore.

Flavious

I did not find anything there.. but a couple mentions of this not being a good idea for heavy traffic sites. If I just do the uninstall from the admin should that be enough to disable it?

Kindred

oh yes.... Aeva will probably increase server load

Also... If your forum is as busy as you say, you might want to consider a dedicated server.   At one of my sites, we went to a dedicated server ages ago because of the load of having a thousand members online at a time...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Flavious

About 100,000 unique visitors, 4-5 million page views. Worth a dedicated sever?

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Something like that

Quote from: Flavious on January 19, 2010, 02:51:42 PM
About 100,000 unique visitors, 4-5 million page views. Worth a dedicated sever?

Yep, a low end dedicated box would be my recommendation. Something with 2 GB+ of RAM.

I ran a site doing 1 million PHP requests daily on a single core box with 1 GB, and it was at its limits during peaks times, and it was heavily tuned.

Flavious

Quote from: Flavious on January 19, 2010, 02:51:42 PM
About 100,000 unique visitors, 4-5 million page views. Worth a dedicated sever?

Per month. Sorry...

Well I killed that video mod and it stopped... just waiting to see if it happens again.

Something like that

Quote from: Flavious on January 19, 2010, 06:18:31 PM
Quote from: Flavious on January 19, 2010, 02:51:42 PM
About 100,000 unique visitors, 4-5 million page views. Worth a dedicated sever?

Per month. Sorry...

Well I killed that video mod and it stopped... just waiting to see if it happens again.

If you want to make Aeva faster, enable only the sites that your members frequently use. For me, that's Youtube and Dailymotion. It's the checking for the number of sites that makes it so slow.

Flavious

Okay it happened again. The CPU is being chewed until the server grinds to a halt. Here's what we see on the server. This has not happened since we deleted that mod, and since then no other mods have been added. Any one have a clue?

========================================
PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
25701 gunty    20   0 34672  14m 6552 R 86.3  0.4   0:26.65 /usr/bin/php /home/gunty/public_html/bs/index.php
25313 gunty     20   0 34672  14m 6524 R 79.6  0.4   1:26.45 /usr/bin/php /home/gunty/public_html/bs/index.php
25745 gunty    20   0 34672  14m 6552 R 78.6  0.4   0:20.39 /usr/bin/php /home/gunty/public_html/bs/index.php
25747 gunty    20   0 34672  14m 6552 R 75.0  0.4   0:19.94 /usr/bin/php /home/gunty/public_html/bs/index.php
25575 gunty     20   0 34672  14m 6540 R 74.0  0.4   0:51.23 /usr/bin/php /home/gunty/public_html/bs/index.php
25495 gunty     20   0 34676  14m 6524 R 71.7  0.4   1:01.03 /usr/bin/php /home/gunty/public_html/bs/index.php
25144 gunty     20   0 35964  14m 6524 R 71.0  0.4   1:47.78 /usr/bin/php /home/gunty/public_html/bs/index.php
25258 gunty     20   0 34932  14m 6524 R 69.4  0.4   1:39.19 /usr/bin/php /home/gunty/public_html/bs/index.php
25681 gunty     20   0 34416  14m 6524 R 69.0  0.4   0:33.60 /usr/bin/php /home/gunty/public_html/bs/index.php
25341 gunty     20   0 34676  14m 6524 R 65.0  0.4   1:22.58 /usr/bin/php /home/gunty/public_html/bs/index.php
========================================

the column called "%CPU" shows cpu usage by each /home/gunty/public_html/bs/index.php instance, so if you summarize all this you will see that this script is critically overloading the server. There must be some bug in it that results in such huge CPU usage but anyway we can't let run many instances of it, eating 10x server CPU resources. Probably you should update your application or hire a web developer to debug/patch it to avoid such problems.

We had to disable this script again because it caused huge server load (~20).

stfox100

What script? You just said you disabled AEVA ?
What are you running for CAPTCHA and anti-spam measures ?  It's the index page that's using all  the resources. As far as I can see, unless you can explain this "script" you're talking about.

Flavious

There's no script, no plugins, no mod. The host used the word "script" to describe simple machines. It is coming from the index.php.. but how? Where?


Flavious

There has to be some code in simple machines that gets stuck in loop when someone posts - why, how or when I have no clue.

Here's what I did to get it to stop:

I could make the CPU go nutz by clicking on "Show unread posts since your last visit" or, if I clicked the first Board I could make it rev the CPU up to 80-90% again. If I clicked on any *other* board, it would work.

So I looked at the listing of last posts for the day. I then went into the database and deleted the last one posted to the board that was locking things up. Problem solved.

However, this keeps happening! I can't duplicate it... But it was happening way more often when we had the AVEA mod on.

chep

It wouldn't hurt to look into your slow queries log and see if there is a specific query running at the time the CPU load spikes. I would also look to see if there are interesting entries in the php error log. The source of the problem could really be a lot of things..

EDIT Just read this below. I would probably get a dedicated server.

Quote from: Flavious on January 19, 2010, 06:18:31 PM
Quote from: Flavious on January 19, 2010, 02:51:42 PM
About 100,000 unique visitors, 4-5 million page views. Worth a dedicated sever?

Per month. Sorry...

Well I killed that video mod and it stopped... just waiting to see if it happens again.

tumbleweed

Neg no dedi server needed in this issue.

Like the op said its some sort of looping issue going on somewere.

Frank
G.C. SOLUTIONS - Hosting Quality Sites Since 2006. Experience Your Forums On A Whole New Level
Elastic Sites Stress Fast CPU/Ram Upgrades- More Info Here.
Reviews By SMF Forum Owners - Read Our Rev

chep

I didn't see any clear indicator of a loop. How did you come to that conclusion? If it's that evident then you can probably already conclude where the bug is with some degree of accuracy. It would be a bug somewhere and not really a server performance concern (although it degrades server performance). I didn't pick any of that up here in this topic..

tumbleweed

My post was in regards to your statment that a dedi server was need for this forum. Which is just not the case.

I came to my conclusion only from the statments of the OP and the things that he did to recreate and or stop the server usage issue.

Frank
G.C. SOLUTIONS - Hosting Quality Sites Since 2006. Experience Your Forums On A Whole New Level
Elastic Sites Stress Fast CPU/Ram Upgrades- More Info Here.
Reviews By SMF Forum Owners - Read Our Rev

chep

I didn't say it was needed. A simple debate of terms but I said "I would get". There are some great advantages to working out these sort of problems when you have complete control.

At any rate I don't know what an OP is. This may not be a loop and could be a sql performance tuning issue or even something else completely. Looking at the entire server and how it is configured, tuned and including any special or interesting errors would be all great things to consider (especially if nobody has clear evidence of code doing a loop and which I cannot see as a logical conclusion here just yet). Otherwise if there is a code bug then by all means please help get it fixed for us all. I just think that sort of conclusion should be vetted in another "board" as opposed to server performance.


stfox100

OP is original Poster, you.
Sounds to me like a user issue. I'd look at mt access logs to see who's been in, especially concerning the guy who made the post you deleted.
I don't see anything obviously wong in the source code. Wondering why you have, <!-- <script type="text/javascript" src="ad-scroller.js"></script> -->


Way up top, when the rest of the code for the script is almost at the bottom of the page.
And I still didn't see an answer for what you're using for anti-spam measures. As far as I know, bots are getting stuck at the index page and keep trying to dig in further. Do you have the rest of our forum blocked for bots? And if so, is it done correctly.

Advertisement: