Current time: 12-15-2019, 04:20 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Long Initial Connection Time
03-22-2013, 01:30 AM
Post: #1
Long Initial Connection Time
I'm trying to figure out why I keep getting a very long initial connection time on my site. It doesn't happen all the time, but very frequently.

Test Results on My Site

What does this initial connection time mean? Been optimizing the heck out of my site and server, but this problem won't go away. What are all the things that could be causing such a long initial connection time? Thanks in advance for any help! Been working at this for months now.
Find all posts by this user
Quote this message in a reply
03-22-2013, 07:03 AM
Post: #2
RE: Long Initial Connection Time
(03-22-2013 01:30 AM)sysokm Wrote:  I'm trying to figure out why I keep getting a very long initial connection time on my site. It doesn't happen all the time, but very frequently.


Maybe this will help you out a bit:

http://www.webpagetest.org/forums/showth...?tid=10331
Find all posts by this user
Quote this message in a reply
03-26-2013, 11:31 PM
Post: #3
RE: Long Initial Connection Time
Odds are (highly) that your Apache server hit the MaxClients and isn't able to respond to new connections until some pending requests have been processed. Apache is a pain in the ass to configure well to deal with persistent connections and php. Depending on how you have it configured, it could be using up one of the clients for the duration of a connection, not just when it is responding to actual requests.

If I HAVE to use apache for something these days I will usually put nginx in front of it as a reverse proxy and have it handle the connections and apache only comes into play for responding to individual requests. If I have a choice I usually use Nginx with php-fpm directly and it scales a lot better (at least to my ability to be able to configure things - I'm sure someone somewhere can configure apache just the right way to handle lots of persistent connections for php content but I haven't seen it yet).
Visit this user's website Find all posts by this user
Quote this message in a reply
03-27-2013, 04:15 AM (This post was last modified: 03-27-2013 04:25 AM by sysokm.)
Post: #4
RE: Long Initial Connection Time
Thank you guys for your response. Turned out that our server was tuned perfectly. There was a problem on the network with our DNS. That was the reason for our long connection time. Thanks again for your help guys!

By the way, here are the results after the fix. Smile http://www.webpagetest.org/result/130326_F1_1DG9/
Find all posts by this user
Quote this message in a reply
04-02-2013, 12:37 AM
Post: #5
RE: Long Initial Connection Time
(03-27-2013 04:15 AM)sysokm Wrote:  Thank you guys for your response. Turned out that our server was tuned perfectly. There was a problem on the network with our DNS. That was the reason for our long connection time. Thanks again for your help guys!

By the way, here are the results after the fix. Smile http://www.webpagetest.org/result/130326_F1_1DG9/

Really? In your test results the DNS lookup completes after 24ms. If the problem was with your DNS wouldn't you expect to see the teal colored bar extend for 20 seconds instead of the orange Initial Connection bar?

As long as the problem has been fixed, that's great. But for anyone landing in this thread with similar symptoms, take it with a grain of salt.
Visit this user's website Find all posts by this user
Quote this message in a reply
04-02-2013, 01:08 AM
Post: #6
RE: Long Initial Connection Time
Yeah, I was wondering the same thing but I was thinking that it might be possible that the server was doing some form of reverse-DNS on inbound connections before accepting them and that THAT might explain the DNS piece that helped but not the site's DNS itself (just conjecture on my part though).
Visit this user's website Find all posts by this user
Quote this message in a reply
04-03-2013, 04:51 AM
Post: #7
RE: Long Initial Connection Time
Hey guys, it turned out that it was actually caused by a wrong entry in our DNS. Our DNS had 1 entry that was correct with the server's actual IP address, the other entry was an error that had the wrong IP. Deleting that entry did the trick. This problem escaped me for so long b/c I didn't think to even check the DNS - taking for granted that it would just be correct.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)