Results 1 to 11 of 11
  1. #1
    Join Date
    Mar 2004
    Posts
    90

    Slow initial response

    On my server, whenever I connect to something for the first time, it's very slow, all the following requests go on fine.

    For example, if I try access a website, for the first time, the browser hangs for a bit, and then the page loads really fast. All the following page requests go really fast as well. I am able to download at over 200kb/sec (my isp limit)

    When I try to send an email thru the server (via outlook express), OE just hangs for a bit and then sends the email real quick.

    FTP is the same story, but here I can actuall see at what spots it is hanging. First it hangs at "Resolving host name" for a bit, then it hangs a lot more at "Socket connected waiting for login sequence.". The second part seems to happen every time I connect. And again, the transfers are really fast.

    What do you think could be the problem?

  2. #2
    Join Date
    Apr 2004
    Location
    SF Bay Area
    Posts
    879

    Re: Slow initial response

    Originally posted by moltar

    FTP is the same story, but here I can actuall see at what spots it is hanging. First it hangs at "Resolving host name" for a bit, then it hangs a lot more at "Socket connected waiting for login sequence.". The second part seems to happen every time I connect. And again, the transfers are really fast.

    What do you think could be the problem?
    I'd surmise the server may not have a DNS server configured. Assuming this is Linux and most other unices, try setting a valid DNS server in /etc/resolv.conf.

    If there is a DNS server already setup, make sure the server is performing forward- and reverse-lookups properly from the server. Try to resolve the hostname of you PC from the server and try to resolve the IP address; e.g.,

    dig @dns.ser.ver.ip A blah.hostname.com

    dig @dns.ser.ver.ip PTR 1.0.168.192.in-addr.arpa

    My other guess is your host accessing this server is not reverse-resolving (i.e., w.x.y.z IP address of your PC's host does not resolve to a fully-qualified host name).

  3. #3
    Join Date
    Mar 2004
    Posts
    90
    Kernel: Linux 2.6.10-1.771_FC2 #1 Mon Mar 28 00:50:14 EST 2005 i686 athlon i386 GNU/Linux
    CP: Plesk 7.5.2
    Distro: FC2

  4. #4
    Join Date
    Mar 2004
    Posts
    90
    This is the output of the commands you suggested. Everything seems to be find. And my IP does resolve. This does not happen with other sites usually. Only with my server.

    Note: the values were faked.

    Code:
    Script started on Tue 07 Jun 2005 06:07:03 PM EDT
    [root@localhost root]# cat /etc/resolv.conf
    nameserver 69.64.44.50
    [root@hunox root]# dig @69.64.44.50 A CPE000c41490777-CM014170000000.cpe.net.cable.rogers.com
    
    ; <<>> DiG 9.2.3 <<>> @69.64.44.50 A CPE000c41490777-CM014170000000.cpe.net.cable.rogers.com
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17959
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4
    
    ;; QUESTION SECTION:
    ;CPE000c41490777-CM014170000000.cpe.net.cable.rogers.com. IN A
    
    ;; ANSWER SECTION:
    CPE000c41490777-CM014170000000.cpe.net.cable.rogers.com. 874 IN A 24.212.49.205
    
    ;; AUTHORITY SECTION:
    cpe.net.cable.rogers.com. 1454  IN      NS      ns2.wlfdle.rnc.net.cable.rogers.com.
    cpe.net.cable.rogers.com. 1454  IN      NS      ns1.ym.rnc.net.cable.rogers.com.
    cpe.net.cable.rogers.com. 1454  IN      NS      ns1.wlfdle.rnc.net.cable.rogers.com.
    cpe.net.cable.rogers.com. 1454  IN      NS      ns2.ym.rnc.net.cable.rogers.com.
    
    ;; ADDITIONAL SECTION:
    ns1.ym.rnc.net.cable.rogers.com. 164744 IN A    24.153.22.141
    ns1.wlfdle.rnc.net.cable.rogers.com. 157474 IN A 24.153.22.13
    ns2.ym.rnc.net.cable.rogers.com. 50088 IN A     24.153.22.142
    ns2.wlfdle.rnc.net.cable.rogers.com. 39207 IN A 24.153.22.14
    
    ;; Query time: 1 msec
    ;; SERVER: 69.64.44.50#53(69.64.44.50)
    ;; WHEN: Tue Jun  7 18:10:40 2005
    ;; MSG SIZE  rcvd: 239
    
    [root@localhost root]# dig @69.64.44.50 PTR 205.49.212.24.in-addr.arpa
    
    ; <<>> DiG 9.2.3 <<>> @69.64.44.50 PTR 205.49.212.24.in-addr.arpa
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41086
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4
    
    ;; QUESTION SECTION:
    ;205.49.212.24.in-addr.arpa.    IN      PTR
    
    ;; ANSWER SECTION:
    205.49.212.24.in-addr.arpa. 1800 IN     PTR     CPE000c41490777-CM014170000000.cpe.net.cable.rogers.com.
    
    ;; AUTHORITY SECTION:
    112.24.in-addr.arpa.    3270    IN      NS      ns1.ym.rnc.net.cable.rogers.com.
    112.24.in-addr.arpa.    3270    IN      NS      ns1.wlfdle.rnc.net.cable.rogers.com.
    112.24.in-addr.arpa.    3270    IN      NS      ns2.ym.rnc.net.cable.rogers.com.
    112.24.in-addr.arpa.    3270    IN      NS      ns2.wlfdle.rnc.net.cable.rogers.com.
    
    ;; ADDITIONAL SECTION:
    ns1.ym.rnc.net.cable.rogers.com. 164603 IN A    24.153.22.141
    ns1.wlfdle.rnc.net.cable.rogers.com. 157333 IN A 24.153.22.13
    ns2.ym.rnc.net.cable.rogers.com. 49947 IN A     24.153.22.142
    ns2.wlfdle.rnc.net.cable.rogers.com. 39066 IN A 24.153.22.14
    
    ;; Query time: 45 msec
    ;; SERVER: 69.64.44.50#53(69.64.44.50)
    ;; WHEN: Tue Jun  7 18:13:01 2005
    ;; MSG SIZE  rcvd: 263
    
    [root@localhost root]# exit
    
    Script done on Tue 07 Jun 2005 06:13:14 PM EDT

  5. #5
    Join Date
    Apr 2001
    Location
    FL, USA
    Posts
    949
    Well I am not sure why the web site would be slow unless some code or the server is having to do DNS lookups.

    Some ftp servers (proftpd for example), may try to do reverse DNS lookups. This is true with some email services. If your IP does not have reverse DNS, then you have to wait for the lookup to timeout before continuing. This is best resolved by assuring that your server has proper DNS configured and that services such as FTP/Apache/POP3/IMAP do not require reverse DNS lookups.

    We save you time, money, and frustration by handling the server management tasks required to run an online business successfully.
    No prodding required. We just do it right the first time. Red Hat, MySQL, Plesk, and cPanel certified staff.

  6. #6
    Join Date
    Dec 2002
    Location
    Egypt
    Posts
    151

    Plesk Ident Problem

    Check to make sure that the name servers that are used for reverse resolution have not been shut down or are working properly. These name servers are specified within the /etc/resolv.conf file and can be replaced if need be.

    It's also very possible that the name servers in the /etc/resolv.conf file are working fine but the ip from where the client is accessing the server is not reverse resolvable. In this case you could turn off the reverse lookup completely.

    For Red Hat servers the -Rt0 option needs to be added to the beginning of the server_args line in the /etc/xinetd.d/smtp_psa file:

    server_args = -Rt0 /var/qmail/bin/relaylock......

    It is necessary to restart xinetd since the changes will take effect the next time SMTP is used.

    The wrapper /var/qmail/bin/tcp-env that plesk uses in front of qmail is sending an ident (port 113) request back to the host originating the connection. If the originating host is running a firewall which drops packets instead of sending rejects, tcp-env waits 25 seconds for a response before timing out. The new Windows Firewall which ships with Windows XP SP2 behaves this You can tell tcp-env to stop waiting for ident responses by adding the -R parameter to it's server_args in /etc/xinetd.d/smtp_psa, like this:

    server = /var/qmail/bin/tcp-env
    server_args = -R /var/qmail/bin/relaylock ....

    For FTP be sure you have these OFF in proftpd.conf

    IdentLookups off
    UseReverseDNS off

    Hope this helps.
    knowledge is Power , Spread it.
    www.e-tutankhamun.com
    ahmed@e-tutankhamun.com
    AIM:AhmedFouad0 , yahooID:xor2004

  7. #7
    Join Date
    Mar 2004
    Posts
    90
    the IP on my machine has a proper DNS entry. It resolves very fast. I don't think it's related to my IP. I should test from other ISPs.

  8. #8
    Join Date
    Mar 2004
    Posts
    90
    AhmedFouad, Thanks for your help!

    Both suggestions worked! The first one with -Rt0 was listed in FAQ from my ISP. I tried it before, but it for some reason didn't work. Now I think about it, I think I didnt restart the xinetd. But it worked like magic now!

    FTP also worked. Those two lines were not "on", but they were not listed in config file at all. I guess they are turned on by default. I added those two lines, restarted xinetd and it also worked like magic.

    Now the only problem is apache. It's not happening all the time, so it's really hard to track this one.

    Thanks for all your help!

  9. #9
    Join Date
    Dec 2002
    Location
    Egypt
    Posts
    151
    Well for Apache it's only one directive that can cause this delay
    but I think it's OFF by default in cPanel , Plesk , DA

    Make sure you have HostnameLookups Off
    in httpd.conf

    Glad to see the other services got fixed.
    knowledge is Power , Spread it.
    www.e-tutankhamun.com
    ahmed@e-tutankhamun.com
    AIM:AhmedFouad0 , yahooID:xor2004

  10. #10
    Join Date
    Jun 2003
    Location
    United States of America
    Posts
    1,847
    i just started reading this but see you got it resolved good to see all things go
    Computer Steroids - Full service website development solutions since 2001.
    (612)234-2768 - Locally owned and operated in the Minneapolis, Minnesota area.

  11. #11
    Join Date
    Mar 2004
    Posts
    90
    HostnameLookups was set to off. As i said, this doesn't happen all the time, that's the strange thing. And it doesn't seem to happen for all domains. Some are fine, and some of them take a while...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •