| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
10-11-2009, 09:32 AM
|
#1
|
|
LQ Newbie
Registered: May 2009
Posts: 10
Rep:
|
Reaching MaxClients, why ?
Hello,
I've been experiencing an issue from time to time:
For no apparent reason ( no traffic spikes, no other scripting identifiable errors), I get an entry in the errog log that MaxClients has been reached and of course httpd stops responding.
There is no load on the server, only a sudden abrupt jump in tasks: there are usually 270~300 processes running but as I mentioned, from time to time, it suddenly jumps to 900+ and crashes apache.
I have configured Apache with a MaxCLients of 800 so far, I have 16 GB of RAM and running a dual Xeon Quadcore setup with CentOS 64 bit.
Could you please advise on some methodical approach to identify this issue ?
Thank you kindly for your time.
Kind regards,
LinuxCroco
|
|
|
|
10-12-2009, 12:25 AM
|
#2
|
|
Guru
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.4, Centos 5.9
Posts: 15,262
|
Try Apache's access_log & error_log.
Also /var/log/messages; see where the traffic is coming from.
If it's some kind of break-in attempt, try mod_throttle or fail2ban.
|
|
|
|
10-14-2009, 02:40 AM
|
#3
|
|
LQ Newbie
Registered: May 2009
Posts: 10
Original Poster
Rep:
|
Quote:
Originally Posted by chrism01
Try Apache's access_log & error_log.
Also /var/log/messages; see where the traffic is coming from.
If it's some kind of break-in attempt, try mod_throttle or fail2ban.
|
Chris, you were correct. I missed the /var/log/messages log.
This is what I found there:
Oct 13 19:18:46 web kernel: possible SYN flooding on port 80. Sending cookies.
Oct 13 19:19:04 web kernel: TCPv6: Possible SYN flooding on port 80. Sending cookies.
Although It's defending against this possible SYN flood by sending cookies, apache gets thrown down. I'm reaching MaxClients and the server is unable to serve new requests.
Any help on how to continue ?
Thanks !
|
|
|
|
10-14-2009, 06:18 AM
|
#4
|
|
LQ Newbie
Registered: May 2009
Posts: 10
Original Poster
Rep:
|
Another statistic that troubles me is this:
Running "netstat -s" I notice:
Tcp:
3403236 active connections openings
287134948 passive connection openings
3632799 failed connection attempts
3598067 connection resets received
There's a huge number of failed connection attempts.
|
|
|
|
10-14-2009, 08:54 PM
|
#5
|
|
Guru
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.4, Centos 5.9
Posts: 15,262
|
Try fail2ban http://www.fail2ban.org/wiki/index.php/Main_Page.
You may want to disable IPv6 unless you need it (unlikely):
Quote:
To disable IPv6, we must prevent the loading of the module by adding the following two lines to /etc/modprobe.conf (& reboot system):
alias net-pf-10 off
alias ipv6 off
|
I'd also check your webpages; if you are getting that much traffic, they've prob been hacked to supply other info... Turn off Apache first, then figure out the problem.
Edit: This on today's slashdot.org: help from google for webmasters who (may) have been compromised:
Quote:
|
"In an effort to promote the 'general health of the Web,' Google will send Webmasters snippets of malicious code (http://googleonlinesecurity.blogspot...e-malware.html) in the hopes of getting infected Web sites cleaned up faster. The new information will appear as part of Google's Webmaster Tools, a suite of tools that provide data about a Web site, such as site visits. 'We understand the frustration of Webmasters whose sites have been compromised without their knowledge and who discover that their site has been flagged,' wrote Lucas Ballard on Google's online security blog. To Webmasters who are registered with Google, the company will send them an email notifying them of suspicious content along with a list of the affected pages. They'll also be able to see part of the malicious code." Another of the new Webmaster Tools is Fetch as Googlebot ( http://searchengineland.com/see-what...our-site-27623) , which shows you a page as Google's crawler sees it. This should allow Webmasters to see malicious code that bad guys have hidden on their sites via "cloaking," among other benefits.
|
You should prob look into those.
Last edited by chrism01; 10-15-2009 at 12:42 AM.
Reason: Added info about google tools
|
|
|
|
10-15-2009, 06:02 AM
|
#6
|
|
LQ Newbie
Registered: May 2009
Posts: 10
Original Poster
Rep:
|
Thank you.
I have done basic securing of my Linux box. I admit, it could have been done better, but I do not see any signs of intrusions. SSH is secured/
Why did you make the assumption that the box might be hacked ? I can't see any causality between the SYN flood and possible intrusions. Could you please share your thoughts ?
Thanks !
|
|
|
|
10-15-2009, 08:53 PM
|
#7
|
|
Guru
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.4, Centos 5.9
Posts: 15,262
|
SYN is the first TCP pkt sent when trying to connect to a system. Unless you've got some serious info eg, winning lottery nums for next week, why would you suddenly get massive floods like that. There's also a TCP SYN Flood DOS (Denial Of Service) attack: http://en.wikipedia.org/wiki/SYN_flood.
Note I only said 'If it's some kind of break-in attempt', 'if' being the key word there.
From your own logs, the kernel says it suspects the SYN Flood attack; that's why it says its 'sending cookies' as mentioned/recommended in the Wiki article.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:31 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|