Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Initial ping takes more than 10 seconds (10000ms)
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Initial ping takes more than 10 seconds (10000ms)

risharderisharde Patron Provider, Veteran
edited March 2013 in Help

Hi guys, as always, I look to your ideas and insights when it comes to things I cannot see clearly or comprehend. So this one might be simple especially if you're a provider since you might have come across something like this, I just need to understand so it makes sense in my brain due to its vague "symptom".

Essentially, when I try to ping from one of my VPS to any of my other VPS(s) in a different location, it takes more than 10 seconds before I get the initial ping response. After which the ping responses are normally around 64ms (which is fine for me). The problem is that I just can't see beyond the "client side" of things being that I am a client and don't get to see how a network is set up etc.

If I were to make a guess, would this be a possible DNS issue (since it seems the ping times are fine except for the first time it tries to ping)? Or could it be something else - since I don't know much about routing etc? Either way I know the provider will try to help but you know sometimes providers may not provide a full explanation due to their time constraints.

As usual, any ideas, insights, suggestions would be appreciated for my further understanding and knowledge development

Thanks guys

P.S I only began noticing this after trying to troubleshoot my uptime script that I'm working on: http://www.risharde.com/projects/uptime/uptime_viewer.php which is showing nodes offline when they are actually online. The script was working fine yesterday and wasn't modified so that's when I did the ping and realised the above.

Comments

  • Can you try ping -n ? Does it behave the same?

  • superpilesossuperpilesos Member
    edited March 2013

    Is it only for ICMP? Is there also a delay if you just try to telnet to a listening port?

  • risharderisharde Patron Provider, Veteran

    Thanks @rds100 and @superpilesos going to try both suggestions and will update you guys in a few minutes

  • risharderisharde Patron Provider, Veteran

    @rds100 ping -n is much faster than without the -n. Trying to google up what the -n does but google doesn't seem to like what I'm searching for, what does -n do?

  • risharderisharde Patron Provider, Veteran

    @superpilesos telnet connects right away to port 80 (on the other vps(s) which has http server on)

  • risharderisharde Patron Provider, Veteran

    all using hostnames btw... not using the direct ip... hope this helps

  • superpilesossuperpilesos Member
    edited March 2013

    @risharde said: @rds100 ping -n is much faster than without the -n. Trying to google up what the -n does but google doesn't seem to like what I'm searching for, what does -n do?

    [root@serverbg ~]# man ping|grep -- "-n"
           -n     Numeric output only.  No attempt will be made to lookup symbolic names for host addresses.
    [root@serverbg ~]#
    
  • ping -n makes the ping not try to resolve the IPs back to names.
    Either the IPs you are pinging have broken reverse resolve (dead or lame servers), or the recursive resolvers (/etc/resolv.conf) you use are stupid.

  • So what's in your /etc/resolv.conf ?

  • risharderisharde Patron Provider, Veteran
    edited March 2013

    Thanks @superpilesos much appreciated, I should indeed use the man command more often I am such a noob sometimes lol

    @rds100 thanks for the info as well, I think you are dead on here because check this:
    [root@www /]# cat /etc/resolv.conf nameserver 127.0.0.1 nameserver 8.8.8.8 nameserver 4.2.2.2

    I'm guessing that nameserver 127.0.0.1 shouldn't be there because I sure didn't put that there and I've never noticed it being in any of my other VPS resolv.conf files. Now come to think about it, I did install a new vps control panel this week... I think that's where that line came from... going to remove it and test again

  • Yes, unless you are running a recursive resolver yourself the 127.0.0.1 line shouldn't be there.

  • risharderisharde Patron Provider, Veteran

    After the edit, more of the pings are now responding pretty much instantly but one or two are still what seems to be resolving slowly... so strange but thanks so far for the help @rds100 and @superpilesos , much appreciated ;)

  • risharderisharde Patron Provider, Veteran

    I just realised something as well... the uptime script is using jquery which means that its client side. The strange thing is that if I go to the uptime stats page for each vps (the jquery calls that file on each server), I can see it in my browser but the uptime script isn't somehow getting the data so this makes it more complicated since it might not be server related at all now ;(

  • risharderisharde Patron Provider, Veteran

    @superpilesos yes you are correct, after a few checks it seems to actually be the browsers causing this. IE9 doesn't like the cross domain .post in the script while Chrome doesn't have a problem. Thanks for the heads up, I'll have to rethink how I can make this cross-browser compatible. Really appreciate all the help ;)

  • ChanChan Member

    @risharde
    Googling ping -n will make google search for pages about ping, without the character n
    In order to search properly you'll have to type in "ping -n" with the quotes

  • risharderisharde Patron Provider, Veteran

    Hi @Chan , thanks for the tip, much appreciated ;)

  • Or google for "man ping" -- no quotes needed -- to get an html man page....

  • risharderisharde Patron Provider, Veteran

    Thanks @sleddog much appreciated as well ;)

  • RalliasRallias Member
    edited March 2013

    @rds100 said: Yes, unless you are running a recursive resolver yourself the 127.0.0.1 line shouldn't be there.

    Ubuntu default, at least with 12.10 and 13.04.

Sign In or Register to comment.