Sites on my server are loading slow.
Hello,
My sites on the server are loading very slow, though my server load is under 1.00. What can be the problem, when ever i restart httpd the sites starts to load instantly. What can be the problem. Im sorry if im posting in a wrong place. but im newbie so if any body can give me any idea then i will be thankful. Thanks |
Look through the logs, monitor what happens in the logs when a request comes in, there is probably something in your config that is slowing everything down. Can you give us some more info, e.g., hardware, linux distro, which webserver?
|
Here is my server details:
Webserver: Apache Operating System: CentOS 5 Processor: Core2Quad Q9300 HDD: 1TB RAM 8GBDDR2 Which log should i check. |
no replies here.. please guide me what should i do???
|
Hi,
The logs that come to mind are the apache logs, but also look at the other logs too. It might not be apache related. Does this happen when you have multiple connections (from the outside or from the same machine??) or also with one connection? Not much to go on, but maybe it helps. |
Please post some of your system logs, apache logs, output of top command. Then it will be easy to know what is going on wrong.
|
i cant see any logs on my /var/log/httpd folder.
Is there any other place where i can fine the logs of apache. |
1 Attachment(s)
|
Hi,
Check your httpd.conf file, the location of the logfile(s) should be mentioned there (the ErrorLog directive). Did you also check the other logfiles, as I mentioned in post #5? Hope this helps. |
Hi,
Quote:
|
i found this line on my httpd.conf:
ErrorLog logs/error_log and then i saw the error_log which contains lots of File not found errors. Please tell me where i can find other log files. |
Hi,
/var/log |
Which log should i post here.
|
@druuna: yes there are lots of sites but not much connection and httpd requests, but still server seems very very slow. Its not the network issue as if i restart apache it comes to normal state and loads in instant.
|
Hi again,
One thing that isn't clear to me yet: Do you have access to your website from the outside? If so: Could it be possible that there are a lot of outside connections which would slow down your box? You can check with netstat -plan | grep ":80 " (I'm assuming apache is listening on port 80). The above command should be executed regularly to see if there are any connections (which should grow over time after (re)starting apache). This is also true for the top command you showed earlier (it is just a snapshot), maybe you see increases in cpu/mem/swap/load over time. You mention that there are a lot of file not found errors in your apache error_log: Where do these come from (it does strengthen my feeling that your website does have outside access). Maybe the slowdown is just that: people trying to connect to your website (these connections could be legitimate, or not). I would suggest running the following commands on a regular base: 1) top (to see mem/cpu/load/swap) 2) netstat -plan | grep ":80 " (to see the amount of connections) 3) ps -ef | grep http (to see the httpd processes) Hope this helps. BTW: I'm not sure which log files in /var/log are of interest, you need to check yourself if you see anything that is out of the ordinary. |
All times are GMT -5. The time now is 01:40 AM. |