By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,650 Members | 1,823 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,650 IT Pros & Developers. It's quick & easy.

PHP Driven Site responding slow on different networks.

P: n/a
I have a strange bandwidth issue that I have finally tracked down to
something fairly specific if anyone has any ideas...

Setup: Win2003 Server, PHP 4.3.4, IIS6.0, ISAPI

Network: DSL line with a Cisco 678 router using NAT and static port
maps. Two switches between webserver and Cisco.

Problem: Accessing PHP driven site via any computer except the web
server is about 20 times slower. I can get fast response on the server
by browsing to it's local IP address (http://10.0.0.x) or
(http://localhost). However, if I use the external IP address
(65.100.86.X) from the IIS server, the site is slow again. I figured
that my Cisco had an issue or there was some problem in my network, so I
replaced my Cisco with my spare and swapped out hubs for switches etc
internally with no change. If I use a different computer on my LAN to go
to http://10.0.0.X then I get the same slow response. I have packet
dumped my network (nothing strange) and even disconnected all computers
except for the IIS server and I still get the same results. I really
thought it was a network issue until I replaced everything. If I telnet
to one of the slow IP addresses, the HTML just comes out slower. I still
think this is a network issue but I just wanted to post here in case
there was something strange with PHP under 2k3 that I was missing.

thanks for any suggestions anyone might have (unless they are to switch
over to Apache. ;-)

If anyone wants to try... http://www.gamearchive.com

thanks... jess

Jul 17 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
Hi J!

On Mon, 26 Jan 2004 18:23:33 -0700, j askey <_j****@askeydot.org>
wrote:
I have a strange bandwidth issue that I have finally tracked down to
something fairly specific if anyone has any ideas...

Setup: Win2003 Server, PHP 4.3.4, IIS6.0, ISAPI

Network: DSL line with a Cisco 678 router using NAT and static port
maps. Two switches between webserver and Cisco.

Problem: Accessing PHP driven site via any computer except the web
server is about 20 times slower. I can get fast response on the server
by browsing to it's local IP address (http://10.0.0.x) or
(http://localhost). However, if I use the external IP address
(65.100.86.X) from the IIS server, the site is slow again. I figured
that my Cisco had an issue or there was some problem in my network, so I
replaced my Cisco with my spare and swapped out hubs for switches etc
internally with no change. If I use a different computer on my LAN to go
to http://10.0.0.X then I get the same slow response. I have packet
dumped my network (nothing strange) and even disconnected all computers
except for the IIS server and I still get the same results. I really
thought it was a network issue until I replaced everything. If I telnet
to one of the slow IP addresses, the HTML just comes out slower. I still
think this is a network issue but I just wanted to post here in case
there was something strange with PHP under 2k3 that I was missing.


Often these issues are DNS or Reverse DNS issues, eg. the machine not
being able to look after one of these entries.

How you sort that out with these magic-now-everything-better-Win2003
machines - I don't know.

HTH, Jochen
--
Jochen Daum - CANS Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/
Jul 17 '05 #2

P: n/a
I actually found this in a older other newsgroup posting... seems like I
need to wait for SP1...

------

This class of perf issues has been reported, we have investigated, and we
will have a fix in the next Windows Server 2003 Service Pack. The class of
perf issues is not limited to ASP -- can affect PHP, Perl, etc . It also
manifests itself differently between local access and remote access.

This is a simple illustration of the worst problem:

<%
Response.Buffer = true

Response.Write ( "Start: " & Now & "<br>" )

FOR i = 1 TO 100000
Response.Write( "A" )
Response.Flush()
NEXT

Response.Write ( "<br>stop: " & Now & "<br>" )
%>
What we have found was that there are several interacting issues -- some are
IIS perf issues, and some are user-code perf issues -- so even with our
fixes, a user's website may be slower.

Basically, if you want to improve performance, buffering has to happen in
some form -- either you do it, or the system does a guess for you. The
layers under IIS5 would buffer network traffic in some form regardless of
"response.buffer = false" -- but with IIS6, you can actually see the effects
of no buffering...

----------

end attachment

Jochen Daum wrote:
Hi J!

On Mon, 26 Jan 2004 18:23:33 -0700, j askey <_j****@askeydot.org>
wrote:

I have a strange bandwidth issue that I have finally tracked down to
something fairly specific if anyone has any ideas...

Setup: Win2003 Server, PHP 4.3.4, IIS6.0, ISAPI

Network: DSL line with a Cisco 678 router using NAT and static port
maps. Two switches between webserver and Cisco.

Problem: Accessing PHP driven site via any computer except the web
server is about 20 times slower. I can get fast response on the server
by browsing to it's local IP address (http://10.0.0.x) or
(http://localhost). However, if I use the external IP address
(65.100.86.X) from the IIS server, the site is slow again. I figured
that my Cisco had an issue or there was some problem in my network, so I
replaced my Cisco with my spare and swapped out hubs for switches etc
internally with no change. If I use a different computer on my LAN to go
to http://10.0.0.X then I get the same slow response. I have packet
dumped my network (nothing strange) and even disconnected all computers
except for the IIS server and I still get the same results. I really
thought it was a network issue until I replaced everything. If I telnet
to one of the slow IP addresses, the HTML just comes out slower. I still
think this is a network issue but I just wanted to post here in case
there was something strange with PHP under 2k3 that I was missing.

Often these issues are DNS or Reverse DNS issues, eg. the machine not
being able to look after one of these entries.

How you sort that out with these magic-now-everything-better-Win2003
machines - I don't know.

HTH, Jochen


Jul 17 '05 #3

P: n/a
Given that the page header manages to get sent before the delay occur, I
would say there's something in the PHP code. The only thing that changes
when you use a different IP to access the site is SERVER_ADDR. Perhaps
you're passing that variable to the database open routine? If so, change
that to localhost.

Uzytkownik "j askey" <_j****@askeydot.org> napisal w wiadomosci
news:d4************@fe07.usenetserver.com...
I have a strange bandwidth issue that I have finally tracked down to
something fairly specific if anyone has any ideas...

Setup: Win2003 Server, PHP 4.3.4, IIS6.0, ISAPI

Network: DSL line with a Cisco 678 router using NAT and static port
maps. Two switches between webserver and Cisco.

Problem: Accessing PHP driven site via any computer except the web
server is about 20 times slower. I can get fast response on the server
by browsing to it's local IP address (http://10.0.0.x) or
(http://localhost). However, if I use the external IP address
(65.100.86.X) from the IIS server, the site is slow again. I figured
that my Cisco had an issue or there was some problem in my network, so I
replaced my Cisco with my spare and swapped out hubs for switches etc
internally with no change. If I use a different computer on my LAN to go
to http://10.0.0.X then I get the same slow response. I have packet
dumped my network (nothing strange) and even disconnected all computers
except for the IIS server and I still get the same results. I really
thought it was a network issue until I replaced everything. If I telnet
to one of the slow IP addresses, the HTML just comes out slower. I still
think this is a network issue but I just wanted to post here in case
there was something strange with PHP under 2k3 that I was missing.

thanks for any suggestions anyone might have (unless they are to switch
over to Apache. ;-)

If anyone wants to try... http://www.gamearchive.com

thanks... jess

Jul 17 '05 #4

P: n/a
j askey wrote:
I actually found this in a older other newsgroup posting... seems like I
need to wait for SP1...

------

This class of perf issues has been reported, we have investigated, and we
will have a fix in the next Windows Server 2003 Service Pack. The class of
perf issues is not limited to ASP -- can affect PHP, Perl, etc . It also
manifests itself differently between local access and remote access.

This is a simple illustration of the worst problem:

<%
Response.Buffer = true

Response.Write ( "Start: " & Now & "<br>" )

FOR i = 1 TO 100000
Response.Write( "A" )
Response.Flush()
NEXT

Response.Write ( "<br>stop: " & Now & "<br>" )
%>
What we have found was that there are several interacting issues -- some
are
IIS perf issues, and some are user-code perf issues -- so even with our
fixes, a user's website may be slower.

Basically, if you want to improve performance, buffering has to happen in
some form -- either you do it, or the system does a guess for you. The
layers under IIS5 would buffer network traffic in some form regardless of
"response.buffer = false" -- but with IIS6, you can actually see the
effects
of no buffering...

----------

end attachment

Jochen Daum wrote:
Hi J!

On Mon, 26 Jan 2004 18:23:33 -0700, j askey <_j****@askeydot.org>
wrote:

I have a strange bandwidth issue that I have finally tracked down to
something fairly specific if anyone has any ideas...

Setup: Win2003 Server, PHP 4.3.4, IIS6.0, ISAPI

Network: DSL line with a Cisco 678 router using NAT and static port
maps. Two switches between webserver and Cisco.

Problem: Accessing PHP driven site via any computer except the web
server is about 20 times slower. I can get fast response on the
server by browsing to it's local IP address (http://10.0.0.x) or
(http://localhost). However, if I use the external IP address
(65.100.86.X) from the IIS server, the site is slow again. I figured
that my Cisco had an issue or there was some problem in my network,
so I replaced my Cisco with my spare and swapped out hubs for
switches etc internally with no change. If I use a different computer
on my LAN to go to http://10.0.0.X then I get the same slow response.
I have packet dumped my network (nothing strange) and even
disconnected all computers except for the IIS server and I still get
the same results. I really thought it was a network issue until I
replaced everything. If I telnet to one of the slow IP addresses, the
HTML just comes out slower. I still think this is a network issue but
I just wanted to post here in case there was something strange with
PHP under 2k3 that I was missing.


Often these issues are DNS or Reverse DNS issues, eg. the machine not
being able to look after one of these entries.

How you sort that out with these magic-now-everything-better-Win2003
machines - I don't know.

HTH, Jochen



Sounds like you'd be able to spell relief: "A-P-A-C-H-E"

;)

- Dan
http://www.dantripp.com/
Jul 17 '05 #5

P: n/a
heh heh... but I just came from A-P-A-C-H-E land. :-) I needed .net
support without having to stuble around in cassini's sort of strict
environment for now. But, you are right, if I don't get this working
better soon. Im heading back over the hill.

Dan Tripp wrote:
j askey wrote:
I actually found this in a older other newsgroup posting... seems like
I need to wait for SP1...

------

This class of perf issues has been reported, we have investigated, and we
will have a fix in the next Windows Server 2003 Service Pack. The
class of
perf issues is not limited to ASP -- can affect PHP, Perl, etc . It also
manifests itself differently between local access and remote access.

This is a simple illustration of the worst problem:

<%
Response.Buffer = true

Response.Write ( "Start: " & Now & "<br>" )

FOR i = 1 TO 100000
Response.Write( "A" )
Response.Flush()
NEXT

Response.Write ( "<br>stop: " & Now & "<br>" )
%>
What we have found was that there are several interacting issues --
some are
IIS perf issues, and some are user-code perf issues -- so even with our
fixes, a user's website may be slower.

Basically, if you want to improve performance, buffering has to happen in
some form -- either you do it, or the system does a guess for you. The
layers under IIS5 would buffer network traffic in some form regardless of
"response.buffer = false" -- but with IIS6, you can actually see the
effects
of no buffering...

----------

end attachment

Jochen Daum wrote:
Hi J!

On Mon, 26 Jan 2004 18:23:33 -0700, j askey <_j****@askeydot.org>
wrote:
I have a strange bandwidth issue that I have finally tracked down to
something fairly specific if anyone has any ideas...

Setup: Win2003 Server, PHP 4.3.4, IIS6.0, ISAPI

Network: DSL line with a Cisco 678 router using NAT and static port
maps. Two switches between webserver and Cisco.

Problem: Accessing PHP driven site via any computer except the web
server is about 20 times slower. I can get fast response on the
server by browsing to it's local IP address (http://10.0.0.x) or
(http://localhost). However, if I use the external IP address
(65.100.86.X) from the IIS server, the site is slow again. I figured
that my Cisco had an issue or there was some problem in my network,
so I replaced my Cisco with my spare and swapped out hubs for
switches etc internally with no change. If I use a different
computer on my LAN to go to http://10.0.0.X then I get the same slow
response. I have packet dumped my network (nothing strange) and even
disconnected all computers except for the IIS server and I still
get the same results. I really thought it was a network issue until
I replaced everything. If I telnet to one of the slow IP addresses,
the HTML just comes out slower. I still think this is a network
issue but I just wanted to post here in case there was something
strange with PHP under 2k3 that I was missing.


Often these issues are DNS or Reverse DNS issues, eg. the machine not
being able to look after one of these entries.

How you sort that out with these magic-now-everything-better-Win2003
machines - I don't know.

HTH, Jochen



Sounds like you'd be able to spell relief: "A-P-A-C-H-E"

;)

- Dan
http://www.dantripp.com/


Jul 17 '05 #6

P: n/a
Okay, I did have a reverse DNS resolution issue but that is fixed now
and it still loads slowly. Thanks for getting my butt in gear to fix
that tho. ;-)

Jochen Daum wrote:
Hi J!

On Mon, 26 Jan 2004 18:23:33 -0700, j askey <_j****@askeydot.org>
wrote:

I have a strange bandwidth issue that I have finally tracked down to
something fairly specific if anyone has any ideas...

Setup: Win2003 Server, PHP 4.3.4, IIS6.0, ISAPI

Network: DSL line with a Cisco 678 router using NAT and static port
maps. Two switches between webserver and Cisco.

Problem: Accessing PHP driven site via any computer except the web
server is about 20 times slower. I can get fast response on the server
by browsing to it's local IP address (http://10.0.0.x) or
(http://localhost). However, if I use the external IP address
(65.100.86.X) from the IIS server, the site is slow again. I figured
that my Cisco had an issue or there was some problem in my network, so I
replaced my Cisco with my spare and swapped out hubs for switches etc
internally with no change. If I use a different computer on my LAN to go
to http://10.0.0.X then I get the same slow response. I have packet
dumped my network (nothing strange) and even disconnected all computers
except for the IIS server and I still get the same results. I really
thought it was a network issue until I replaced everything. If I telnet
to one of the slow IP addresses, the HTML just comes out slower. I still
think this is a network issue but I just wanted to post here in case
there was something strange with PHP under 2k3 that I was missing.

Often these issues are DNS or Reverse DNS issues, eg. the machine not
being able to look after one of these entries.

How you sort that out with these magic-now-everything-better-Win2003
machines - I don't know.

HTH, Jochen


Jul 17 '05 #7

P: n/a
Chung Leong wrote:
Given that the page header manages to get sent before the delay occur, I
would say there's something in the PHP code. The only thing that changes
when you use a different IP to access the site is SERVER_ADDR. Perhaps
you're passing that variable to the database open routine? If so, change
that to localhost.
I removed all my PHP code that refers to SERVER_ADDR or REMOTE_ADDR but
all still acts the same. It is strange as I can watch the packet log and
the delay is just on the web server machine, by something like 250ms
per packet or so. If you look at the text over telnet port 80, the text
actually comes through fairly consistent, just slow. Because of the way
I have my page designed with nested tables, the rendering is delayed
until the table structure is finished so it seems to take a long time
before the page actually draws completely.

I got some feedback from the guys in the microsoft.iis ng and from doing
a log of IIS threads using iisstart, they seem to think that it is not
IIS nor PHP but a network issue. The only thing I have not replaced yet
is the NIC, will do that tomorrow.

thanks for your insights.

Uzytkownik "j askey" <_j****@askeydot.org> napisal w wiadomosci
news:d4************@fe07.usenetserver.com...
I have a strange bandwidth issue that I have finally tracked down to
something fairly specific if anyone has any ideas...

Setup: Win2003 Server, PHP 4.3.4, IIS6.0, ISAPI

Network: DSL line with a Cisco 678 router using NAT and static port
maps. Two switches between webserver and Cisco.

Problem: Accessing PHP driven site via any computer except the web
server is about 20 times slower. I can get fast response on the server
by browsing to it's local IP address (http://10.0.0.x) or
(http://localhost). However, if I use the external IP address
(65.100.86.X) from the IIS server, the site is slow again. I figured
that my Cisco had an issue or there was some problem in my network, so I
replaced my Cisco with my spare and swapped out hubs for switches etc
internally with no change. If I use a different computer on my LAN to go
to http://10.0.0.X then I get the same slow response. I have packet
dumped my network (nothing strange) and even disconnected all computers
except for the IIS server and I still get the same results. I really
thought it was a network issue until I replaced everything. If I telnet
to one of the slow IP addresses, the HTML just comes out slower. I still
think this is a network issue but I just wanted to post here in case
there was something strange with PHP under 2k3 that I was missing.

thanks for any suggestions anyone might have (unless they are to switch
over to Apache. ;-)

If anyone wants to try... http://www.gamearchive.com

thanks... jess



Jul 17 '05 #8

P: n/a
Okay, after some playing with the network I still had no speed
improvement. So I went back to the know problem with IIS that outputs
looped text extremely poorly. After looking at my php.ini file it seems
I had output_buffering = Off still. I set this to output_buffering =
1500 and the page loaded in .541 seconds over the previous 11.497
seconds. Huge improvement!!! It is funny tho since the note on
output_buffering states that using it may slow down output so use
carefully. Apparently IIS6.0 has some network output issues that will be
fixed in SP1 but this works now. Thank you everyone for your help.

I guess I needed to get into the MS mindset now that Im not using
apache... 'slow down the output to make the page load faster'. DOH...
it's so logical! ;-)
j askey wrote:
I have a strange bandwidth issue that I have finally tracked down to
something fairly specific if anyone has any ideas...

Setup: Win2003 Server, PHP 4.3.4, IIS6.0, ISAPI

Network: DSL line with a Cisco 678 router using NAT and static port
maps. Two switches between webserver and Cisco.

Problem: Accessing PHP driven site via any computer except the web
server is about 20 times slower. I can get fast response on the server
by browsing to it's local IP address (http://10.0.0.x) or
(http://localhost). However, if I use the external IP address
(65.100.86.X) from the IIS server, the site is slow again. I figured
that my Cisco had an issue or there was some problem in my network, so I
replaced my Cisco with my spare and swapped out hubs for switches etc
internally with no change. If I use a different computer on my LAN to go
to http://10.0.0.X then I get the same slow response. I have packet
dumped my network (nothing strange) and even disconnected all computers
except for the IIS server and I still get the same results. I really
thought it was a network issue until I replaced everything. If I telnet
to one of the slow IP addresses, the HTML just comes out slower. I still
think this is a network issue but I just wanted to post here in case
there was something strange with PHP under 2k3 that I was missing.

thanks for any suggestions anyone might have (unless they are to switch
over to Apache. ;-)

If anyone wants to try... http://www.gamearchive.com

thanks... jess


Jul 17 '05 #9

P: n/a
r
I was just experiencing this exact same problem. I had set up a new
server for a friend of mine that had a PHP application that I wrote. I
set it up on server 2003, and everything was working great for the
first week. Then this past Saturday night, I put the server into
production. Sunday, everything worked great. (There are about 40
computers that use this web server within the network) Then this
morning, everything started going extremely slow. Worked perfectly on
the local machine, but anywhere else it was slow as hell. I went as far
as replacing the NIC. Then I found this topic. the buffering option in
PHP completely fixed my problem, except that I didn't use a number, I
just turned it on. restarted IIS, and the pages that were taking
anywhere from 5-10 seconds, were taking only a split second to load.
Everything seemed normal.

I was about to switch everything over to apache, but I'm glad I was
able to figure this out. Thanks for this topic!

Jul 17 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.