LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 05-30-2010, 12:47 PM   #1
roshanekka
LQ Newbie
 
Registered: May 2010
Posts: 28

Rep: Reputation: 15
Unhappy 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
 
Old 05-30-2010, 12:55 PM   #2
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 82
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?
 
Old 05-31-2010, 12:00 AM   #3
roshanekka
LQ Newbie
 
Registered: May 2010
Posts: 28

Original Poster
Rep: Reputation: 15
Here is my server details:

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

Which log should i check.
 
Old 06-02-2010, 04:05 AM   #4
roshanekka
LQ Newbie
 
Registered: May 2010
Posts: 28

Original Poster
Rep: Reputation: 15
no replies here.. please guide me what should i do???
 
Old 06-02-2010, 04:29 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
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.
 
Old 06-02-2010, 09:25 AM   #6
sang_froid
Member
 
Registered: Oct 2006
Posts: 179

Rep: Reputation: 15
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.
 
Old 06-02-2010, 12:57 PM   #7
roshanekka
LQ Newbie
 
Registered: May 2010
Posts: 28

Original Poster
Rep: Reputation: 15
i cant see any logs on my /var/log/httpd folder.

Is there any other place where i can fine the logs of apache.
 
Old 06-02-2010, 01:08 PM   #8
roshanekka
LQ Newbie
 
Registered: May 2010
Posts: 28

Original Poster
Rep: Reputation: 15
see my top processes:

http://i46.tinypic.com/10ynvkm.jpg
Attached Images
File Type: jpg 10ynvkm.jpg (127.0 KB, 0 views)
 
Old 06-02-2010, 01:08 PM   #9
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
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.
 
Old 06-02-2010, 01:10 PM   #10
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

Quote:
Originally Posted by roshanekka View Post
Looks like a machines that's not doing much at all.......
 
Old 06-02-2010, 01:23 PM   #11
roshanekka
LQ Newbie
 
Registered: May 2010
Posts: 28

Original Poster
Rep: Reputation: 15
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.
 
Old 06-02-2010, 01:25 PM   #12
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

/var/log
 
Old 06-02-2010, 01:34 PM   #13
roshanekka
LQ Newbie
 
Registered: May 2010
Posts: 28

Original Poster
Rep: Reputation: 15
Which log should i post here.
 
Old 06-02-2010, 01:39 PM   #14
roshanekka
LQ Newbie
 
Registered: May 2010
Posts: 28

Original Poster
Rep: Reputation: 15
@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.
 
Old 06-03-2010, 03:00 AM   #15
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
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.

Last edited by druuna; 06-03-2010 at 12:58 PM. Reason: fixed a typo
 
  


Reply

Tags
fine, load, server


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with third party sites loading jschiwal LQ Suggestions & Feedback 3 06-12-2008 03:56 PM
memory leak? Server loading slow. thachp Linux - Newbie 1 01-27-2006 07:38 PM
memory leak? Server loading slow. thachp Linux - Newbie 0 01-27-2006 07:26 PM
Site loading slow on New server tommytomato Linux - General 4 08-31-2004 06:19 PM


All times are GMT -5. The time now is 03:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration