2

Well i just bought a new dedicated server, I have no Linux experience, but i'm trying to learn.

I have been testing the server for a few days. I improve the httpd.conf my.cnf for better performance, etc.

I notice that my server was reaching MaxClient value in a matter of seconds, and obviously my site start loading really slow.

So I checked the net to see how many httpd process were opened by the same ip:

  # netstat -ntu | grep :80 | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

netstat results showing 58 connections from my server's own IP address

I thought that my server might be under TCP SYN attack, but then I realize that the IP is my own server. So I really don't understand what is going on.

The server is fine, great response, 30% ram usage, 15% CPU usage, and suddenly my own server open many httpd process at the same time, also each process takes like 1.5% of my total ram. So it goes from 40 clients to 120+ clients in a matter of min-secs.

If you guys got any advice for me I will really appreciate it, I have been using linux just for the last three days. At this point, I'm kind of lost.

Skyhawk
  • 14,200
  • 4
  • 53
  • 95
ilcreatore
  • 21
  • 1
  • 3

2 Answers2

2

It doesn't look like a Linux problem, it looks like an Apache problem.

What do your logs say?

Is it a site that used to work and now is being moved to another machine, or are you setting up a new one? If it is an old site, is connection from your own IP to your is normal?

netstat -ntu --program will tell you what program is connecting to port 80.

I guess your site is hosting something more than static pages. Try to find what's the minimum configuration (modules/virtual hosts/applications) needed to reproduce the problem. This will help you to narrow down the troubleshooting area.

Paweł Brodacki
  • 6,511
  • 20
  • 23
0

Try disabling mod_status (in particular the ExtendedStatus directive) and see if the number of connection from your own server to himself drops, I think ExtendedStatus hits apache from localhost to determine some of its counters.

Shadok
  • 623
  • 5
  • 10