lbillett Posted October 25, 2010 Share Posted October 25, 2010 I've got a problem very similar to that discussed in this older thread. Basically, if left alone for a few minutes, attempting a page load can take quite a few seconds (10-20) or sometimes time out! However, after one page is served, successive page loads are of nice speed. It's an XP WAMP machine using Mediawiki. It's on our local Intranet and it doesn't seem to matter if I use hostnames or the IP address. The loading is quite light, so I have a hard time believing it's traffic related. The machine it's on runs the MySQL server and the webserver ONLY. Oh, and get this, I can see almost the same kind of behavior when PINGING the machine! Take a look. C:\Documents and Settings\lbillett>ping 10.183.12.5 Pinging 10.183.12.5 with 32 bytes of data: Request timed out. Reply from 10.183.12.5: bytes=32 time<1ms TTL=128 Reply from 10.183.12.5: bytes=32 time<1ms TTL=128 Reply from 10.183.12.5: bytes=32 time<1ms TTL=128 Ping statistics for 10.183.12.5: Packets: Sent = 4, Received = 3, Lost = 1 (25% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms On a local network! This makes me think it's not PHP related at all. Any ideas on how to trouble shoot this? Thanks!! Quote Link to comment https://forums.phpfreaks.com/topic/216813-slow-initial-page-load-with-phpmysql/ Share on other sites More sharing options...
phpfreak Posted October 25, 2010 Share Posted October 25, 2010 Sounds like a DNS issue.. Perhaps your web server is trying to do a lookup on your IP address and since it's internal, it can't find anything and causing the 10 - 20 second delay. I would check that you have your internal DNS setup and pointing to the correct places, or edit your hosts file and see if you can map hostnames to your local IP, or disable hostname lookups in either your Apache config or PHP config if necessary. Quote Link to comment https://forums.phpfreaks.com/topic/216813-slow-initial-page-load-with-phpmysql/#findComment-1126356 Share on other sites More sharing options...
NLCJ Posted November 4, 2010 Share Posted November 4, 2010 PHPFreaks is right. Another way to fix this is to set your nameservers, the first one to that server and then the other one to the router / modem. In this way your computer will look at the server first and then go onto the internet. At this moment it's searching for that IP address at the internet, and then going local. I think you've got multiple routers or so? Quote Link to comment https://forums.phpfreaks.com/topic/216813-slow-initial-page-load-with-phpmysql/#findComment-1130159 Share on other sites More sharing options...
gizmola Posted November 5, 2010 Share Posted November 5, 2010 Perhaps it's because XP is not a server platform? Your ping test clearly shows that the machine itself has to wake up out of some sort of network slumber. Is it possible that you have not disabled all the power management settings and some or all of the machine is going to sleep? That might explain why it seems to have to wake up, but once it does it's ok. In all seriousness though, if this is in anyway important to the company, you ought to have it running on a real server operating system -- either a windows server, linux or bsd etc. Quote Link to comment https://forums.phpfreaks.com/topic/216813-slow-initial-page-load-with-phpmysql/#findComment-1130592 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.