logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache2 crashing all our servers - help please
Author
Arild



Joined: 04 Oct 2012
Posts: 5
Location: Stavanger, norway

PostPosted: Thu 04 Oct '12 10:50    Post subject: Apache2 crashing all our servers - help please Reply with quote

Hi all.
New user here and not to well known with apache etc.
So please dont shoot me if i get some terms wrong.

Running a ubuntu server with wordpress & Buddypress on it. Also running a windows 2008 server with the identical setup with wamp2

We have been running WP + BP for a while with alot of trouble. We have a site with 30 users. We have our own rack server 64bit dualcore cpu + 8gb ram.

First we where running on one.com but had problems there so they closed our hosting. Then we got our own server with a dedicated 500 mbit link for it. Running 2008 server + wamp2 with mysql, apache & phpmyadmin.

Now we changed to ubuntu to try to sort out why we have these problems but problems still excists and here is what happens.

We run buddypress, which we use buddypress activity stream as a chat for our 30 users. Plugin installed buddypress activity refresh where refresh is set to 20 seconds.
We have the theme supermassive from themeforest implemented.

Everytime a user connects we get serious high cpu loads. Yesterday we had 10 users online and the load on the box went from 0.2 up to about 42 as the 10 people where online chatting and the box crashed.
Running windows, the httpd.exe was using 90-100++% cpu usage, but now in linux we see www-data using alot.

like this:

7745 www-data 20 0 281m 114m 35m S 65 2.9 1:39.97 apache2
8629 www-data 20 0 275m 109m 35m S 58 2.8 0:49.28 apache2
9081 www-data 20 0 264m 97m 35m S 28 2.5 0:05.68 apache2

the pids seem like loops.. they last for a few seconds, then comes back after a little while running the same.
As you can see those 3 active there now use 65, 58 and 28% cpu. only last for a few seconds but they are repeating themselves all the time.
20 users at the same time crashes the box. Did so on one.com, our 2008server and same now on our linuxserver.

if this info isnt good enough i will post whatever you need. We have been using a sick amount of hours trying to sort these problems now and we are on the edge of cancelling the whole project..

Thanks in advance for all help.

best regards

Arild
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 04 Oct '12 14:33    Post subject: Reply with quote

That high CPU usage is caused by the chat plugin. You could increase the interval between chat polls the server. By default the interval is set to 1 second, if you increase it to 2seconds CPU load will reduce by 50%.

CPU load is caused by CPU being hit by all users using chat once a second. If you have 5 users, that's 5 connections per second.

I've read a lot of troubles with that chat plugin on the internet. Often it is the optimier. Do you use something like ZendOptimizer or eAccelerator? At least there are some troules with ZendOptimizer.

If that doesn't help you might want to try a different php chat.
Back to top
Arild



Joined: 04 Oct 2012
Posts: 5
Location: Stavanger, norway

PostPosted: Thu 04 Oct '12 14:38    Post subject: Reply with quote

thanks mate.
Installed eaccelerator yesterday.. seemed to help a tiny bit but not to much.
Can i ask where i can change the interval?
Im learning, but im not to good yet with all the programming.. but guess everyone has to start from scratch once Smile

Appreciated!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 04 Oct '12 14:48    Post subject: Reply with quote

change the refresh interval via Settings>Chat>Advanced
Back to top
Arild



Joined: 04 Oct 2012
Posts: 5
Location: Stavanger, norway

PostPosted: Thu 04 Oct '12 14:54    Post subject: Reply with quote

cheers but thats not the issue here.. we use buddypress activity stream as chat function.. there isnt any other setting for this.. normally it doesnt update it self either, we added a plugin for this and the update on that plugin is set to every 20 seconds.
We seem to get this problem no matter what its set to.. just running buddypress is hard for the servers.

Googled around everywhere but no one seem to have the same problem. For us its been crashing on 4 servers now on only few users.

here's right now with 2 logged in users.

14:53:59 up 16:11, 2 users, load average: 1.13, 1.30, 1.59
Tasks: 121 total, 5 running, 116 sleeping, 0 stopped, 0 zombie
Cpu(s): 87.9%us, 4.0%sy, 0.0%ni, 8.1%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 3990476k total, 1712224k used, 2278252k free, 145652k buffers
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 04 Oct '12 14:56    Post subject: Reply with quote

Well my google search: buddypress high cpu load shows a lot of results.
Back to top
Arild



Joined: 04 Oct 2012
Posts: 5
Location: Stavanger, norway

PostPosted: Thu 04 Oct '12 16:49    Post subject: Reply with quote

yeah.. i find alot, but none of them is like my problem.
Apache2 loads skyhigh on linux and apache's httpd.exe in windows is just the same.
Back to top
Arild



Joined: 04 Oct 2012
Posts: 5
Location: Stavanger, norway

PostPosted: Thu 04 Oct '12 22:20    Post subject: Reply with quote

load on box today with about 15 online users..

load average: 128.05, 66.32, 30.27

it crashed obviously.. nothing else but linux - apache2 - wordpress + buddypress running on our box
Back to top


Reply to topic   Topic: Apache2 crashing all our servers - help please View previous topic :: View next topic
Post new topic   Forum Index -> Apache