First visit of the day is slow, other fast.

Discussion in 'Installation/Configuration' started by Nimarda, Jul 5, 2010.

  1. Nimarda

    Nimarda New Member

    Hi,

    First of all, my server:
    Debian Lenny
    ISPConfig 3.0.2.1
    Apache/2.2.9 (Debian) DAV/2 PHP/5.3.2-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g
    MySQL 5.1.48-0.dotdeb.0

    When i visit a website on my vps, the first load is extreme long. (10 sec)
    When i do a refresh, it is super fast. and every other page is fast to.

    When i visit the website after a couple hours or a next day again, it is again slow, refresh or other visits are fast, just like the first one.

    I have configured as Fast-cgi php, but also changed this to Mod-php but the same every time..

    And i don't know what to do right now.. I hope someone can help me.
     
  2. Toucan

    Toucan Member

    Not sure I know the definitive answer, but are you sure you're not viewing a cached version of the site when it loads super quick?

    What if you view a page on the same site you've not viewed before or something wth dynamic content?

    Another thing that springs to mind is your dns lookups are cached and it's your dns lookup that is taking the time. I think if you use firefox, it tells you at the bottom bar what it's doing so could give you an indication.

    If you log into your control panel across the internet using the ip address is that also slow?

    You could edit your hosts file for one of your sites to point directly to the ip of your server thus cutting out dns lookups and then you can rule that out.

    edit:
    windows/system32/drivers/hosts

    add line
    Code:
    yourserverip       www.yourwebsite.com
    I'm sure others can come up with some better diagnostics but here's a good place to start
     
  3. Mark_NL

    Mark_NL Member

    I was thinking the same things:

    - File cache (local)
    - File cache (remote)
    - DNS lookups that might be slow

    ..

    So if you load: www.yourweb.com/page1.html it's slow at first, but the refresh is fast, oke .. what if you visit www.yourweb.com/page2.html after your visit to page1.html ? Is it again slow, or still fast?

    if it's slow, you can rule out dns.

    Are you hosting the dns on the same server?
     
  4. Nimarda

    Nimarda New Member

    It's not a DNS lookup. And all pages are dynamic. Not in cache.
    I just added 512 mb intern memory, doesnt seem to help :(

    What could I do?
     
  5. Toucan

    Toucan Member

    How have you ruled out dns lookup delays?

    Did you try marks suggestion of viewing a second page and comparing times?

    What were the results of my dns bypass test by editing your host file?

    How much memory in total do you and what processor? I doubt machine performance is an issue. I have all services running on a very old processor with not much memory
     

Share This Page