Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject:
PostPosted: Mon Mar 07, 2011 4:23 am 
Offline
Junior Member

Joined: Fri Mar 04, 2011 3:14 am
Posts: 25
db3l thank you very much.

I'll check it out, and report the results!


Top
   
 Post subject:
PostPosted: Mon Mar 07, 2011 4:23 am 
Offline
Junior Member

Joined: Fri Mar 04, 2011 3:14 am
Posts: 25
db3l thank you so much.

I'll report the results.


Top
   
 Post subject:
PostPosted: Mon Mar 07, 2011 5:08 am 
Offline
Junior Member

Joined: Wed Feb 09, 2011 7:41 am
Posts: 28
cloudry wrote:
DDOS attacks? I mean...is it common?

They don't necessarily have to be intended as DDOS attacks, sometimes it can be an over aggressive 'bot accessing every page on your site at 1000 requests a minute for example (as has happened to me recently).

As mentioned above, limit the maximum number of httpd processes, that should stop Apache using up all your resources, then find out why there are so many requests or why they're taking so long. It's not necessarily a problem having a high number of requests if you can dispatch them as quick as they arrive.


Top
   
 Post subject:
PostPosted: Wed Mar 09, 2011 10:31 pm 
Offline
Junior Member

Joined: Fri Mar 04, 2011 3:14 am
Posts: 25
Hi,

I have revised my apache2.conf to:


StartServers 5
MinSpareServers 5
MaxSpareServers 10
ServerLimit 25
MaxClients 2
MaxRequestsPerChild 50

My apache is timing out again...This is killing me :( my visitors at my startup are getting stuck :(!!

Please let me know what else I can do.

Edward


Top
   
 Post subject:
PostPosted: Wed Mar 09, 2011 11:34 pm 
Offline
Senior Member

Joined: Thu Jul 22, 2010 8:23 pm
Posts: 60
Edward,

We may need more information on what content you are delivering?

Is this a wordpress or DRUPAL site?

If you have a PHP driven site, are you using an op-code cache like APC?


Top
   
 Post subject:
PostPosted: Wed Mar 09, 2011 11:37 pm 
Offline
Junior Member

Joined: Fri Mar 04, 2011 3:14 am
Posts: 25
Hey!

I am using wordpress. I have about 3 different wordpress blogs running on my server. My server is the linode 1024 package one.

I am running APC also.

This is weird though...I've run APC for a long time, and it's only recently that this started to happen, and my memory isn't used up.

total used free shared buffers cached
Mem: 995 854 140 0 190 494
-/+ buffers/cache: 168 826
Swap: 255 0 255

I usually have a pretty good amount of free left in -/+ buffers/cache.


Edward


Top
   
 Post subject:
PostPosted: Wed Mar 09, 2011 11:48 pm 
Offline
Junior Member

Joined: Fri Mar 04, 2011 3:14 am
Posts: 25
Is there any log file you would like to see? so that you can pinpoint the problemo for me? :)


Top
   
 Post subject:
PostPosted: Wed Mar 09, 2011 11:59 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
cloudry wrote:
My apache is timing out again...This is killing me :( my visitors at my startup are getting stuck :(!!

Well, are we talking about a different problem? What do you mean by "timing out"?

Your Lish/console output showed that you were OOMing previously. Dropping the MaxClients should have helped prevent that but depending on your load (and time to process each request) could certainly create very lengthy delays in processing since now you've bottlenecked things to only 2 concurrent requests. I'm not sure if that matches what you are describing as Apache timing out, but with long enough delays I assume clients might give up.

Assuming, as you indicate, that you still have free memory with this configuration, start increasing MaxClients as long as you still have free memory and you should increase performance (as long as you don't CPU bottleneck or I/O bottleneck with, for example, database I/O). Just don't go so far that you start swapping since that's I/O you can avoid.

If you get as high as you can (memory-wise) and still can't keep up with your request load, then you've got to look at ways at improving the time to process single requests. Your use of APC is definitely already a good thing, but you might find, for example, that fronting Apache with a lower resource server (like nginx) for static content can help, since it lets the higher load Apache PHP processes only get used when necessary. Looking through some of the apache tuning forum threads (I'm pretty sure some specifically discussed wordpress) may be of help at that point.

Of course, worst case is to just grow your Linode to get more memory (and thus the ability to have additional concurrent processes) but until it's clear that you can't tune things within your current memory I wouldn't jump to that point since otherwise it might not actually help anyway.

-- David


Top
   
 Post subject:
PostPosted: Thu Mar 10, 2011 12:39 am 
Offline
Senior Member

Joined: Thu Jul 22, 2010 8:23 pm
Posts: 60
How much memory are you allocating to APC?

Are you running many plugin's? try removing all unnecessary plugins.

A 1024 linode should be able to handle quite a bit.

I couldn't see a key_buffer_size if you my.cnf file, are you leaving this at default level?


Top
   
 Post subject:
PostPosted: Thu Mar 10, 2011 12:42 am 
Offline
Junior Member

Joined: Fri Mar 04, 2011 3:14 am
Posts: 25
Please see my phpinfo~

http://www.swagly.com/phpinfo.php

Also, I don't have a key_buffer_size at all. What should I set it as?

my APC is shm size is set at 256. is that too high?

I've also increased my max clients to 10 for now.


Top
   
 Post subject:
PostPosted: Thu Mar 10, 2011 1:08 am 
Offline
Senior Member

Joined: Thu Jul 22, 2010 8:23 pm
Posts: 60
well the final question is are you logging slow MYSQL queries? log any queries > 1second to execute...

apache processes may be backing up waiting for mysql queries to complete.

key_buffer_size should be adjusted depending on how big your key_reads is, (or a better alternative Key_read_ratio_%)

personally I have mine set to 384M

as for APC, use apc.php to visualise how much cache you are actually utilising.. 256M is pretty big.


Top
   
 Post subject:
PostPosted: Thu Mar 10, 2011 1:15 am 
Offline
Junior Member

Joined: Fri Mar 04, 2011 3:14 am
Posts: 25
Okay, I've revised my APC shm size to 128, and changed my key buffer size to 384M like you have it. I'll monitor to see how this performs.


Top
   
 Post subject:
PostPosted: Thu Mar 10, 2011 6:48 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
128Mb for apc is still very high, here's my stats

Cached Files 107 ( 9.3 MBytes)
Hits 415553
Misses 831
Request Rate (hits, misses) 1.52 cache requests/second
Hit Rate 1.52 cache requests/second
Miss Rate 0.00 cache requests/second
Insert Rate 0.00 cache requests/second
Cache full count 2

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Thu Mar 10, 2011 9:28 pm 
Offline
Junior Member

Joined: Fri Mar 04, 2011 3:14 am
Posts: 25
Also I see my apache2s running (shown in screenshot), but they are not responding...

www.swagly.com/1.png
www.swagly.com/2.png

What else can I post here to help get the root problem fixed?

And I definitely wasn't running out of memory...


total used free shared buffers cached
Mem: 995 823 171 0 192 411
-/+ buffers/cache: 219 775
Swap: 255 0 255


Top
   
 Post subject:
PostPosted: Thu Mar 10, 2011 9:43 pm 
Offline
Senior Member

Joined: Wed Mar 03, 2010 2:04 pm
Posts: 111
Anything unusual show up in your Apache error log (or VirtualHost specific logs, if configured)? Particularly around the times your apache goes unresponsive?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group