The strangest problem ever..... Please someone help!!!

wetcat007

Diamond Member
Nov 5, 2002
3,502
0
0
Ok I recently moved my website over to use MySQL database to retrieve most everything, and i was testing it out on my friends server for a while it worked fine, so I moved it over to my server, and it seemed to be working fine, however i have a script that tells you how long it took for the page to be compiled, and when i access it using my home network, I get .006 seconds as an average, exactly the type of speed I would expect, however when i try to access it from the internet i get sometimes over 1 second. Now please note this is not to measure load times but the time, it takes for the server to retreive the information from the database. Can anyone explain what in the world is going on here? I've tried it using Apache 1.3.7 on Slackware Linux 9, and on Windows XP using IIS5.1. It seems to be plagued somehow to my internet connection, and I'm completly confused how it would be.

Please someone help me out on this one, i've spent all day troubleshooting it!

-Mark
 

GoingUp

Lifer
Jul 31, 2002
16,720
1
71
i would assume its your net connection..

on a home network youre probably runnin at 100mbps...

on cable or dsl youre probably around 786 kbps

That would be my guess :)
 

wetcat007

Diamond Member
Nov 5, 2002
3,502
0
0
Originally posted by: Gobadgrs
i would assume its your net connection..

on a home network youre probably runnin at 100mbps...

on cable or dsl youre probably around 786 kbps

That would be my guess :)

Yeah, that's what my friend thought, but how would that affect the time it takes to compile a page? The compiling is all done internally on the server... That's what confuses me so much. lol my cables actually 2000 kps but yeah i get your point :).
 

nailsoft

Junior Member
Jul 21, 2003
2
0
0
OK, compare the two servers. Both running slackware. One is running mine is running 8 and his is running 9. I'm using apache 1.3.20 and he's using 1.3.27. Were both using mysql 3.x. Compare the two servers:

Fast - http://sclhs.us/pcraider/ - running on multiple T3's.
Slow - http://www.pcraider.com:8888/ - running on a Cable connection
At the bottom of each page you will see a "This page loaded in x seconds" thing. On my P3 450Mhz box, I get very short compile times. On his (faster) AMD Athlon 1700+ he gets at least half a second compile times. Does anyone know what's going on here? Is it the internet connection? Or is it something wrong with the accual machine?
 

chsh1ca

Golden Member
Feb 17, 2003
1,179
0
0
How are you displaying the "page loaded in x seconds" message? My initial thoughts are that is its a logical flaw with the underlying code, although I'm going on very little info. :)

Either that, or maybe you have reverse DNS lookups enabled in apache's logs, which might slow down 'net load times, but not over the lan, especially if you have a DNS server on your lan. I'm not sure why it would be affecting the display of the message though, since that should be performed before the request is served. Still, something to check out.
 

nailsoft

Junior Member
Jul 21, 2003
2
0
0
<?php

//BEGIN RECORDING TIME
function utime (){
$time = explode( " ", microtime());
$usec = (double)$time[0];
$sec = (double)$time[1];
return $sec + $usec;
}
$start = utime();
/*
content here
*/
//PRINT LOAD TIME
$end = utime(); $run = $end - $start;
echo ("Page loaded in " . substr($run, 0, 5) . " secs.");

?>