Howdy, Stranger!

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


Weird latency at first http access
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.

Weird latency at first http access

Hello,
I own a les vps (Italy) with nothing running and whe I try to access a php page via simple http (nginx) the server responds after 5 seconds. The following requests are instantaneous. It seems like there's a connection delay for the server to come up.
I noticed that in those 5 seconds the php page is not processed...it tried both via direct ipv4 and with cloudflare ipv6 tunnel. This doesn't happen for ssh access. Could it be nginx does some kind of "pre-check" after X hours of no access? It is weird since it never happened with other providers.

Comments

  • are you running php5-fpm with ondemand settings for the pool?

    if so, then it takes some time(don't know how long, but not too long) for a child to become active and process the server's request.

    See some explanation: http://www.webhostingtalk.com/showthread.php?t=1138195&p=8024658#post8024658 and http://stackoverflow.com/questions/29111271/php5-fpm-static-dynamic-or-on-demand

  • No I'm not using on demand config.

  • Are you using a caching mechanism? Could be some slow loading components to the page, which are cached afterwards.

  • My guess .... Dns.

    Try doing a page test with tools.pingdom.com and showing us the results .

    Thanked by 1lbft
  • Browser caching...?

  • raindog308raindog308 Administrator, Veteran

    NSA

    Thanked by 2hostnoob netomx
  • 5 seconds sounds like a DNS timeout. Check if all the resolvers configured on the VPS are alive.

    Thanked by 1lbft
  • sandrosandro Member
    edited November 2015

    I did a test with pingdom but it has no useful information, it actually took 21seconds to open the link today from there, the following ones a < 1sec. Where should I check DNS resolvers?
    Anyway no caching on, it's almost a vanilla nginx configuration. What I don't is why it doesn't happen with ssh access.

  • exception0x876exception0x876 Member, Host Rep, LIR

    @sandro said:
    Where should I check DNS resolvers?

    /etc/resolv.conf

    Thanked by 1Rolter
  • @exception0x876 said:
    /etc/resolv.conf

    Just have the two Google's DNSs.

  • And on your computer? Problem might be your dns servers (and/or records), not the configuration of the server.

  • Is it the same for all the sites you browse or just for one particular site?

  • It happens with all computers (even pingdom test resulted in the same behaviour)

  • erkinerkin Member
    edited November 2015

    Then its possibly about the nameservers of the domain in question. Probably at least one of domain nameservers not serving.

  • oneilonlineoneilonline Member, Host Rep

    Yes, it takes a few ms for the NSA to pull your profile AND verify ;)

    Thanked by 1netomx
  • It also happens with direct IP, does it matter?

  • @sandro said:
    It happens with all computers (even pingdom test resulted in the same behaviour)

    Then post a screenshot of pingdom so we can see ! We can't help you if you don't post the information.

    Thanked by 1netomx
  • @Mun said:

    I will later but doesn't the page just show the seconds to load the page with no other info? :p

  • @sandro said:

    See those lovely colors? They mean things! They are a great tool to actually see what is causing the page to load so slowly. It is kinda why I asked so long ago for you to post it. That way we could actually make an informed conclusion on what is taking so long for the page to load.

  • sandrosandro Member
    edited November 2015

    OK I didn't see when hovering the time you get also those info...
    Right now it's doing it so I don't know :) maybe because I restarted nginx days ago. Not sure what's happening.

  • Sorry I meant "it's not doing it" of course :)

Sign In or Register to comment.