LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Sites on my server are loading slow. (https://www.linuxquestions.org/questions/linux-server-73/sites-on-my-server-are-loading-slow-811093/)

roshanekka 05-30-2010 11:47 AM

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

irishbitte 05-30-2010 11:55 AM

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?

roshanekka 05-30-2010 11:00 PM

Here is my server details:

Webserver: Apache
Operating System: CentOS 5
Processor: Core2Quad Q9300
HDD: 1TB
RAM 8GBDDR2

Which log should i check.

roshanekka 06-02-2010 03:05 AM

no replies here.. please guide me what should i do???

druuna 06-02-2010 03:29 AM

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.

sang_froid 06-02-2010 08:25 AM

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.

roshanekka 06-02-2010 11:57 AM

i cant see any logs on my /var/log/httpd folder.

Is there any other place where i can fine the logs of apache.

roshanekka 06-02-2010 12:08 PM

1 Attachment(s)
see my top processes:

http://i46.tinypic.com/10ynvkm.jpg

druuna 06-02-2010 12:08 PM

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.

druuna 06-02-2010 12:10 PM

Hi,

Quote:

Originally Posted by roshanekka (Post 3990206)

Looks like a machines that's not doing much at all.......

roshanekka 06-02-2010 12:23 PM

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.

druuna 06-02-2010 12:25 PM

Hi,

/var/log

roshanekka 06-02-2010 12:34 PM

Which log should i post here.

roshanekka 06-02-2010 12:39 PM

@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.

druuna 06-03-2010 02:00 AM

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.