hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Server problem(apache?)
Reply

Forum Jump

Server problem(apache?)

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 10-19-2005, 03:59 PM
Dmitry85 Dmitry85 is offline
WHT Addict
 
Join Date: Mar 2005
Posts: 103

Server problem(apache?)


Hello,

I have this strange problem with my server, average bandwith is around 25Mpbs but sometimes it drops in 1 instance to 5Mbps and the site go very slow. And then after some hours without changing anything it goes back to normal, the sites load fast again.
Its a P4 2.8Ghz with 1024MB ram. Its running a big site with 50K+ uniques visitors/day, its a php/mysql site(small queries).

I also mailed the datacenter they say my server is connected via 1Gbps line to coreswitch so the network could not be the problem(they say)
Normally I have 350 processen en server load is around 1, cpu 7%.Example site on the server http://domainshuffle.com/ (maybe fast again when you view it.)
I tried restarting apache,mysql,whole server, cleaning tmp, looking for cron, did not changed anything.
I think its a problem with apache because when I want to view server-status it sometimes will not show(see output below).

I would really appreciate it if someone could help me.
Thx in advance


I will show some output when site are slow (at this moment).

Code:
top:
top - 20:45:24 up 5 days, 35 min,  2 users,  load average: 0.36, 0.31, 0.33
Tasks: 167 total,   1 running, 137 sleeping,   0 stopped,  29 zombie
Cpu(s):  3.0% us,  4.2% sy,  0.0% ni, 88.5% id,  2.8% wa,  0.0% hi,  1.5% si
Mem:   1034492k total,   996636k used,    37856k free,    21292k buffers
Swap:  2096472k total,    61028k used,  2035444k free,   819480k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
18060 root      25   0 22868  13m 9792 S  2.3  1.3   2:45.60 httpd
 8952 root      16   0  8648 2216 1792 S  0.3  0.2   0:01.22 sshd
15724 root      16   0  3736  992  748 R  0.3  0.1   0:00.01 top
15816 apache    25   0     0    0    0 Z  0.3  0.0   0:00.01 httpd <defunct>
15817 apache    23   0 23028  13m 9956 S  0.3  1.3   0:00.01 httpd
15823 apache    25   0     0    0    0 Z  0.3  0.0   0:00.01 httpd <defunct>
    1 root      16   0  2644  452  420 S  0.0  0.0   0:00.80 init
    2 root      RT   0     0    0    0 S  0.0  0.0   0:00.35 migration/0
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.88 ksoftirqd/0
    4 root      RT   0     0    0    0 S  0.0  0.0   0:00.36 migration/1
    5 root      34  19     0    0    0 S  0.0  0.0   0:01.15 ksoftirqd/1
    6 root       5 -10     0    0    0 S  0.0  0.0   0:00.00 events/0
    7 root       5 -10     0    0    0 S  0.0  0.0   0:00.00 events/1
    8 root       6 -10     0    0    0 S  0.0  0.0   0:00.00 khelper
    9 root      15 -10     0    0    0 S  0.0  0.0   0:00.00 kacpid
   29 root       5 -10     0    0    0 S  0.0  0.0   0:00.00 kblockd/0


free -m
                  total       used       free     shared    buffers     cached
Mem:          1010        986         24          0         20        814
-/+ buffers/cache:        151        859
Swap:         2047         59       1987



Sometimes when I want to view server-status I get this:

Looking up localhost
Making HTTP connection to localhost
Alert!: Unable to connect to remote host.
lynx: Can't access startfile http://localhost/server-status


And sometimes:

 Server uptime: 5 minutes 47 seconds
   Total accesses: 14 - Total Traffic: 411 kB
   CPU Usage: u.34 s.04 cu0 cs0 - .11% CPU load
   .0403 requests/sec - 1212 B/second - 29.4 kB/request


hdparm -tT /dev/sda

/dev/sda:
 Timing cached reads:   3080 MB in  2.00 seconds = 1538.70 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device
 Timing buffered disk reads:  148 MB in  3.00 seconds =  49.32 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device


httpd.conf: (I have run along time with this config dont think this it the problem)

Timeout 100
KeepAlive On
MaxKeepAliveRequests 150
KeepAliveTimeout 1
MinSpareServers 10
MaxSpareServers 22
StartServers 8
MaxClients 550
MaxRequestsPerChild 400


Last edited by Dmitry85; 10-19-2005 at 04:05 PM.


Sponsored Links
  #2  
Old 10-19-2005, 04:28 PM
eth00 eth00 is offline
Web Hosting Master
 
Join Date: Apr 2003
Location: NC
Posts: 2,960
Everything above looks just fine. If you are having trouble when the bandwidth drops perhaps it is the provider? I would suggest setting up something like hotsanic that can graph the load and cpu, see if you can get any coorliation. From the above it looks like this may be an isp related problem since the disks are fast, loads low, and apache is doing almost nothing.

__________________
John W, CISSP
MS Information Security and Assurance
www.yawig.com - Managed VPS and Dedicated Servers with VIP Service
www.eth0.us - Server Admin Info

  #3  
Old 10-19-2005, 04:40 PM
Dmitry85 Dmitry85 is offline
WHT Addict
 
Join Date: Mar 2005
Posts: 103
Thx, was thinking of that also(problem with isp) but when I try to look at server-status, it will not show up sometimes and thats local(like you see on output).
Here is a testfile http://83.149.104.34/10mb.bin

Sponsored Links
  #4  
Old 10-19-2005, 04:51 PM
WiredMom WiredMom is offline
Junior Guru
 
Join Date: Mar 2002
Location: Toronto
Posts: 237
I'm having this same problem right now I think.
Brand new box pretty much - and its for a very active site with around 200 and up people viewing hte site.

Past few days was fine - I edited httpd.conf when I set the box up to increase the maxclients..Was running fine with anywhere between 260 to 380 processes at a time.

Now it cant get above 125 - and which is basic. The apache processes running are about 5 or so at the most at a time - and keep getting killed (defunct).

Apache Status in WHM says logging a lot - L - and I've tried everything I can think of - but I cant get it going again. Site is dragging and loading slowly for everyone.
Any ideas?

  #5  
Old 10-19-2005, 05:16 PM
Dmitry85 Dmitry85 is offline
WHT Addict
 
Join Date: Mar 2005
Posts: 103
"Good" that I am not alone, when I look at top and press "c" to see the command I see this,
"18060 root 25 0 22868 13m 9792 S 2.3 1.3 5:18.11 /usr/sbin/httpd -DHAVE_AUTOINDEX -DHAVE_CERN_META -DHAVE_REWRITE -DHAVE_AUTH -DHAVE_STATUS -DHAVE" on top.
Dont know if it gives you any information.

  #6  
Old 10-20-2005, 12:47 AM
Dmitry85 Dmitry85 is offline
WHT Addict
 
Join Date: Mar 2005
Posts: 103
I have gone to sleep and server is backup running fine again, sites load fast. So I know what to do just go to sleep :p

Anyone an idea how to solve this ?

  #7  
Old 10-20-2005, 06:36 PM
WiredMom WiredMom is offline
Junior Guru
 
Join Date: Mar 2002
Location: Toronto
Posts: 237
Hey Dmitry
I solved my problem by clearing the apache error log - it was huge - AND the domlog for the site - again it was huge.
If you go into ssh and type

tail -150 /usr/local/apache/logs/error_log - or wherever your error log is and see a lot of error about file size exceeded - then odds are its your domlogs etc.,

If so - you can go into WHM and check the option to delete the logs after stats run so that it doesnt get too big.

Then do a regular (cron) logrotate on your apache access and error logs cuz they are bound to get big as well with a busy site like that.

Hope this helps.

  #8  
Old 10-21-2005, 05:00 AM
Dmitry85 Dmitry85 is offline
WHT Addict
 
Join Date: Mar 2005
Posts: 103
Thanks but my logs are not that big, awstats cleans it.
Biggest log is 534MB, and my logs are at /var/log/httpd/domains
But when the problem comes back I will look at the logs if they are to big.

Anyone any other suggestions?

  #9  
Old 11-01-2005, 06:49 PM
Dmitry85 Dmitry85 is offline
WHT Addict
 
Join Date: Mar 2005
Posts: 103
And again I am having the same problem, sites are very slow at the moment, anyone an idea what this?

Thx in advance

  #10  
Old 11-03-2005, 07:15 PM
Dmitry85 Dmitry85 is offline
WHT Addict
 
Join Date: Mar 2005
Posts: 103
Found it, logs where to big 2GB, yihaaaaa!

Thx ALOT CeciliaH !!


Last edited by Dmitry85; 11-03-2005 at 07:28 PM.
Reply

Related posts from TheWhir.com
Title Type Date Posted
Microsoft Gains Most Websites in May Netcraft Web Server Survey Web Hosting News 2014-05-09 11:38:05
Apache Market Share Falls in Netcraft October Web Server Survey Web Hosting News 2013-10-04 14:34:11
Apache Continues to Dominate Web Server Market in Netcraft May Survey Web Hosting News 2013-05-06 14:29:02
Researchers Urge System Admins to Check for New Apache Web Server Backdoor Malware Web Hosting News 2013-05-01 11:35:53
Apache Loses 9.9 Million Sites in Netcraft April 2013 Web Server Survey Web Hosting News 2013-04-03 14:42:33


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:
WHT Membership
WHT Membership



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?