Results 1 to 14 of 14
-
02-12-2014, 11:12 AM #1New Member
- Join Date
- Feb 2014
- Posts
- 4
Why is there always a delay when people connect to my web server?
Hello,
(This is a problem that has been bugging me for years now, and I still haven't found the solution. I practically gave up, but I want to give it one last try on this forum.)
I have my own small dedicated web server for years now. It is running a version of Ubuntu Server Edition and Apache 2 (I keep everything up-to-date). On this server I host several websites, six or so. I pay a hosting company (DreamHost) for domain names, and I use their DNS server to forward domain names to my server's public IP address. So far this all works fine, people from around the world can access the web sites hosted on this server.
Now this is the problem I have. Whenever people enter the website's address in their browser, and they hit the Enter button, the website doesn't load. You can wait like a minute or so until the browser finally gives up. But if you try that a second time, the website will load immediately (and will continue to respond fast). In fact, during the first attempt, you don't have to wait for the browser to give up - when you hit Enter, just wait 5 seconds, hit the browser's Stop button, and then hit Enter again, and the website will load immediately.
I don't have this problem if I access one of my websites locally (from within the same local network), which means that it is not an issue with the web server or Apache. I also don't have this problem from some external locations. For example, if I access my website from my university, it will load immediately. But from most other locations I have tried, I have the above described problem.
Another interesting fact. My webserver has SSH access, and this problem does not seem to occur when I access my webserver via SSH.
Does anyone reading this have an idea of what could be going on here? What could I try to troubleshoot this problem?
P.S. By the way, this is my server: byobu.info. You could try to connect and see for yourself.Last edited by figure002; 02-12-2014 at 11:16 AM. Reason: Fixed typo
-
02-12-2014, 11:32 AM #2Web Hosting Master
- Join Date
- Jun 2010
- Location
- Grand Rapids, Mi
- Posts
- 712
Are you hosting this at home? If so, it is likely that your path to the internet is not the best, or your upload speed is not fast enough. You want the least amount of hops possible (be close to a "main pipeline")
██ Stream101 | Affordable Media Solutions
██ Shared cPanelŽ Web Hosting | WordPress Hosting | Premium Stream Hosting
██ TOLL-FREE: (616) 277-7280 | 30 Day NO QUESTIONS Money-Back Guarantee
██ 100% Cogent Free Network | CloudLinux OS | Tier 1 Bandwidth | Grand Rapids, MI
-
02-12-2014, 11:38 AM #3Newbie
- Join Date
- Feb 2014
- Posts
- 10
Hello,
Maybe you need to reboot the server, always works for me, but yet again if your hosting it from home it could be an issue.
In the end, whenever I reboot my server it works just like it did when I bought it.
Thanks,
Matt
<<signature to be set up in profile>>Last edited by Postbox; 02-12-2014 at 12:21 PM.
-
02-12-2014, 11:58 AM #4New Member
- Join Date
- Feb 2014
- Posts
- 4
Hi Matt, thanks for your reply. That's not the issue however. As I explained in my post, the server itself is responding fine when accessed locally, always. Also note that I am running GNU/Linux on my server, so rebooting is hardly ever necessary, unless there's a core component that needs to be updated (e.g. the Linux kernel).
I think it's a connection related issue (DNS maybe?).
-
02-12-2014, 12:10 PM #5New Member
- Join Date
- Feb 2014
- Posts
- 4
Thanks for your reply Stream101. Yes, I am hosting this at home. I just contacted my ISP and they said that my connection is good, in fact, better than it is for most of their clients. So I think it's safe to rule out upload speed.
I was actually thinking in the same direction, in terms of "path" to the internet. With "hops", are you referring to DNS servers? I was thinking that maybe it's an issue with one of the DNS servers that is in the path to the internet. How can I figure out the amount of hops? And how could I reduce them?
-
02-12-2014, 12:14 PM #6Retired Moderator
- Join Date
- Oct 2010
- Posts
- 5,079
Get a visitor to your site to run tracert or mtr from their machine to your home server. Paste the results here.
Not as active on WHT as I used to be, but still drop in and receive email notifications from here.
My personal blog site: https://www.oakleys.org.uk/blog
-
02-12-2014, 12:19 PM #7Retired Moderator
- Join Date
- Oct 2010
- Posts
- 5,079
Update - it almost certainly isn't the number of hops from them to your server, however.
Have a look at this.
You've got a 5.54 second delay in the "Wait" stage of the process. That's after the visitor has found your server's IP, after they've connected to it, after they've sent it a request for the web page - but while they wait for the answer. So your server spent 5 seconds assembling the web page to return.
Having done that, you'll see from the waterfall that the other resources (CSS and the like) all came fairly quickly.
I'd guess that the main page takes the server some time to put together? Is it PHP / MySQL or similar? But it's definitely your server that is taking the time.Not as active on WHT as I used to be, but still drop in and receive email notifications from here.
My personal blog site: https://www.oakleys.org.uk/blog
-
02-12-2014, 12:43 PM #8New Member
- Join Date
- Feb 2014
- Posts
- 4
Thanks for your reply James. Actually, the pages on byobu.info are all static HTML pages, but as you can see from Pingdom's output, there's a Javascript that accesses a PHP script for visitor tracking. But I took extra measures to cache pages on the server, to improve responsiveness.
Even though a 5 seconds delay is a little long, I would be fine with that (as long as it stays under 6 seconds). But when people access byobu.info for *the first time*, the web page won't load at all! That's what's bugging me. They have to try a second time (hit refresh) before the page will load.
On the other hand, there is almost no delay when I access any of my hosted websites locally. I hit Enter button, and the web page loads immediately (even when browser cache is cleared).
Something else must be going on here.
By the way, here's the live traceroute output: network-tools.com/default.asp?prog=trace&host=byobu.info
-
02-12-2014, 06:00 PM #9Web Hosting Master
- Join Date
- Jan 2010
- Location
- USA
- Posts
- 2,173
Are you logging with reverse DNS enabled? If you are, then some users would load quickly while other users got stuck in the wait phase (while the reverse DNS lookup was performed).
█ No Support Linux Hosting ● Bargain cPanel Hosting ● Experts Only
█ We IGNORE the support questions, and pass the SAVINGS on to YOU!
█ We also ignore questions about VPS Hosting
-
02-12-2014, 06:06 PM #10Disabled
- Join Date
- Jun 2005
- Posts
- 3,455
What kind of router or model is your server connected behind?
This could be the problem, assuming its not indeed your ISP connection, if you use a cheap home router, this could be hanging while trying to process the request, since they are not actually designed for web servers, this means connections coming in rather than out.
If you use a very cheap 40$ router this could explain why locally you are hitting them fast, but not from outside. It may be worth checking with another device.
-
02-12-2014, 08:01 PM #11Web Hosting Evangelist
- Join Date
- Feb 2008
- Location
- United Kingdom
- Posts
- 503
I've just visited your website and didn't experience this problem, loaded up first time under 1 second.
-
02-12-2014, 11:56 PM #12KM Carpenter
- Join Date
- Feb 2003
- Location
- Albany, New York
- Posts
- 3,026
About a 1 second load time for me.
-
02-13-2014, 02:59 AM #13Newbie
- Join Date
- Jan 2014
- Posts
- 19
Loads quickly... BTW the delayed response is caused by the internet connection. At your home, you can't expect a good performance from your Internet connection, it doesn't matter what your ISP says. Think about hosting providers, their connections' speed is extremely good and the connection is dedicated for serving websites. On the other hand, your ISP is providing the Internet connection for common people that mostly use it to browse the Internet.
-
02-13-2014, 04:32 AM #14Temporarily Suspended
- Join Date
- Dec 2013
- Posts
- 5
Whenever the issue occurs, you may also want to check a few things :
- Apache Status - Is there some apache slots available ?
You may have a huge spike of traffic which is saturating your apache workers.
- Load average - type top as SSH command.
Does it exceed your number of threads which could cause a waiting queue for processes to be executed
You seem to have a static website so there isn't much for the server to do to display your website.
But these 2 steps are a good starting points to troubleshot any slow loading time issues.
You can also install iftop to monitor your current bandwidth usage and see if there any saturation.
Similar Threads
-
Some people cannot connect to website via domain
By Geepeez in forum Domain NamesReplies: 4Last Post: 04-04-2011, 05:23 AM -
server loading delay
By FarzinSB in forum Dedicated ServerReplies: 10Last Post: 03-21-2010, 06:37 AM -
Turn Off back connect From Web Server
By tkanaco in forum Hosting Security and TechnologyReplies: 0Last Post: 08-07-2008, 05:26 AM -
20% of people unable to connect to my site
By BornMunson in forum Hosting Security and TechnologyReplies: 5Last Post: 09-27-2007, 09:15 PM -
If I Own A Web Server How I Do To Connect It!!
By mickeycuba in forum Dedicated ServerReplies: 6Last Post: 11-18-2002, 04:10 PM