Forum Moderators: phranque

Message Too Old, No Replies

Apache 2.0.42 running very slow

but only for the 1st page

         

sned

12:10 am on Oct 7, 2004 (gmt 0)

10+ Year Member



Hi all, here's the deal. I am running Redhat ES 3, Apache 2.0.42, php 5.0.1, and mysql 4.1.3. Everything runs fine, php works, mysql works, apache works, except for this one little thing.

The first page on my site that I open loads extremely slow ~ 5-10s. After that, everything is lightning fast. However, if I open another browser, and load a page .. that page is super slow as well, then the same thing other pages load fast. But then, I go back to the first browser, and try another page, and its back to a slow load for that page.

This is happening for all browsers, even when I'm browsing on the server itself.

Is this something to do with apache, and child processes? MySQL isn't the holdup, the queries are fast, and it's not php, as it happens on both php files and regular html files. Could it be in the way I've configured Apache? - very confused

Thanks,
-sned

lemat

2:52 pm on Oct 10, 2004 (gmt 0)

10+ Year Member



there are few things that slow apache down:

1) RevDNS queries
2) huge mod_rewiter or accerss-list rules
3) some modules, for egzample mod_spelling

try to put httpd.conf on a diet - removing unneccessary modules.

nalin

6:08 pm on Oct 10, 2004 (gmt 0)

10+ Year Member



"Tuning" seems to be a good word to find quality resources.

The first thing I would do would be to look at processes prior to fetching a page ('ps -A' under linux), and netstat output, apache will generally start with a small number of listening threads and slowly scale up more threads to compensate for demand. Aloso I would take a look at logfiles (generally /var/log/[apache¦apache2¦httpd]), particularly the error log for any atypical stuff.

There are all sorts of configuration options that can be detrimental to speed, tracing the process seems to be the best manner in which to find those most effecting ones site.

sned

6:02 pm on Oct 11, 2004 (gmt 0)

10+ Year Member



Thanks for the replies, it seems that it was an error in the network itself, our main DNS server wasn't working quite right, and somebody's laptop had become a master-browser, or something to that effect. Seems to be working fine now.

-sned