LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-03-2010, 07:13 PM   #1
cbtshare
Member
 
Registered: Jul 2009
Posts: 645

Rep: Reputation: 42
Serious Server Hanging Issues


When I run the command ps -aux|grep -i HTTP|wc -l on a normal basis , I get
around 58 connection.When I run the command when my server cpu avg shoots to
over 1000pts , I get 1003 connections , yet when I my DC whats happening
they say my traffic is normal and I am not getting an attack.I have CSF on one server and APF on the other.When its happening I see my server load climbing , then to the 100hundred then my website gets slow until the load climbs to 2000 pts and then my site crashes .The attack seems to die down when I restart my servers though and it happens 2 times peer day.I have a dual quad core, 17 GB a RAM , linux centos 64 bit.Can you guys explain whats happening or suggest and server management company to help?
 
Old 11-03-2010, 07:24 PM   #2
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
It sounds like your apache maxclients setting is far too large for your server. If you can drop this to a reasonable setting it may alleviate your problems.

Regards,

Alunduil
 
Old 11-03-2010, 07:34 PM   #3
cbtshare
Member
 
Registered: Jul 2009
Posts: 645

Original Poster
Rep: Reputation: 42
Well I will say you assumed correct, but I also get alot of traffic to my site.So what should I do? My settings are .

<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 5
ServerLimit 6000
MaxClients 6000
MaxRequestsPerChild 6000
</IfModule>
 
Old 11-03-2010, 09:14 PM   #4
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
How much RAM do you have in your server? Also, it seems that server crumbles under 2000 children but is still manageable around 1000. I would say empirically you can set that to 1024 if you want the site to stay up. If you need to increase your performance there are several places to start looking: PHP (apc and memcached), mysql (lots of stuff here), and a caching load balancer (varnish is an excellent option). If all of that isn't enough or makes things worse you'll need to look into load balancing over multiple servers as your next scalability option.

Regards,

Alunduil
 
Old 11-03-2010, 09:44 PM   #5
cbtshare
Member
 
Registered: Jul 2009
Posts: 645

Original Poster
Rep: Reputation: 42
I have 12 GB or RAM in the server.This is the settings I now have, is it too low?

<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 5
ServerLimit 600
MaxClients 600
MaxRequestsPerChild 600
</IfModule>
 
Old 11-03-2010, 09:58 PM   #6
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Shouldn't be too low but you'll want to monitor your server over the next few days to be sure that you're not hitting MaxClients on a regular basis. If you are then you may want to bring it up and implement other optimizations if possible.

Regards,

Alunduil
 
Old 11-03-2010, 10:35 PM   #7
cbtshare
Member
 
Registered: Jul 2009
Posts: 645

Original Poster
Rep: Reputation: 42
So basically what matters MAXclient or MAXclient per child? And doesnt the sever limit matter?
 
Old 11-04-2010, 08:39 AM   #8
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
The ServerLimit is the maximum number of children and is a hard limit. The MaxClient is the maximum number of clients that can be serviced simultaneously (which corresponds to the number of child processes). MaxRequestPerChild should remain large as that is the number of requests that process can handle before being killed and a new process taking its place.

Regards,

Alunduil
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rtl8169: hanging network/dma issues on secondary interface ifup Clontarf[X] Linux - Networking 3 09-09-2009 01:09 PM
mv hanging a Linux Server HeavyStorm Linux - Newbie 5 09-03-2009 12:47 PM
AWK script is hanging our server Hans Zarkoff Programming 10 08-20-2004 01:32 PM
Constant hanging of X server XStorm Slackware 12 01-31-2004 12:47 AM
nfs hanging server on shutdown bdp Linux - General 2 08-24-2003 09:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration