|
Posted by Gerard on 02/24/05 16:35
Hi Brent,
>
> I noticed you have your error_reporting level set really high (2039),
> which is pretty close to everything. That may be fine on a development
> server, but I wouldn't set it that high on a production server. I'd be
> curious what you log looks like. Perhaps this is causing your slowness,
> perhaps not.
>
This is obviously not it, I changed the reporting level to nothing and still
no go.
> Also, you seem to use the short open tag style '<?'. Not that it's
> causing your problem, but for compatibility you should probably use the
> long style '<?php'.
>
Thanks for the tip, I'll keep that in mind.
Update on the issue:
I just upgraded to PHP5 in an attempt to get the speed under control, it
didn't work.
What I did notice is that even www.debuginc.com/test2.php (which has NO code
in it at ALL, only text) takes 5 seconds to load! Upon closer investigation,
it seems that with both PHP4 and PHP5, any page that ends on .php takes 5
seconds doing NOTHING before it starts to process and actually load...
What could delay any given .php page for 5 seconds on both PHP4 and PHP5? It
doesn't seem to make any sense. I already removed unused CGI modules from
the Apache load process, but still a 5 second delay.
Another interesting note; if you click from page to page fast enough, it
doesn't take as long to load. For some reason, after the initial 5 second
startup hic, it loads consequent pages smoothly. If you wait for 10 seconds
and then click a link, it loads for 5 seconds again.
I don't get this, especially since it seems to affect both PHP4 and PHP5...
- Gerard
>
> On Feb 24, 2005, at 4:54 AM, Gerard wrote:
>
> > Hello people,
> >
> > Recently, one of my webservers became rather slow. At first we thought
> > it
> > was the MySQL backend, but when logged in on MySQL using the command
> > line
> > tool over SSH, it runs as smooth as ever.
> > Static content (normal html pages) also load without delay. It seems
> > that
> > the bottleneck is PHP itself.
> > For the sake of comparison, I created 2 test pages:
> >
> > http://www.debuginc.com/test.html
> > http://www.debuginc.com/test.php
> >
> > Everyone I asked says that the PHP page takes over 5 seconds to load
> > while
> > the HTML one instantly displays. The only code in the PHP page is <?
> > echo
> > 'hello world'; ?>. No MySQL stuff, so that eliminates the initial idea
> > of
> > MySQL causing the slowness.
> >
> > Nevertheless, it IS slow and I have no idea why or where to start
> > looking.
> > The phpinfo() can be found on www.debuginc.com/info.php. Any help or
> > hints
> > are highly appreciated.
> >
> > Another interesting note; this problem started a couple of days ago
> > without
> > any changes in the config or anything. At first I upped the amount of
> > connections Apache would accept, but it soon turned out that was not
> > the
> > problem.
> >
> > Thanks,
> > - Gerard
Navigation:
[Reply to this message]
|