Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 23
Like Tree1Likes
Hi there, I'm having somewhat of a strange problem. Our secondary site accesses the internal intranet via a link, which is basically: externalip:8080/test/test/test/index.php where externalip is the IP address of ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2012
    Posts
    9

    Slow to access internal sites via external IP.


    Hi there, I'm having somewhat of a strange problem.

    Our secondary site accesses the internal intranet via a link, which is basically:

    externalip:8080/test/test/test/index.php

    where externalip is the IP address of my router.

    * This used to work fine before we migrated from ADSL (6mb up / 0.5mb down) to Fibre(70mb / 20mb) *

    Internally, I access the same link, but via 192.168.0.50/test/test/test/index.php

    Internally it loads in 2 seconds, externally it is taking 68seconds(ish)..

    I can't work it out, the fibre shouldave made things loads quicker but is infact very slow. I'm wondering if something network wise is going on.

    The intranet is a php intranet sitting on apache, and using postgresql as the database. Other pages load fine, this specific index.php page does quite a lot of DB connections and so on, but as I say before, it worked fine before the migration.

    Any suggestions please?

  2. #2
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    Hi

    Does the webpage contain many-many and even more small files?

    Cheers

  3. #3
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    From what I understand, you are saying that computers inside the network
    experience this delay when they use the public IP address.
    Do computers outside your network experience this problem?

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jul 2012
    Posts
    9
    Quote Originally Posted by rcgreen View Post
    From what I understand, you are saying that computers inside the network
    experience this delay when they use the public IP address.
    Do computers outside your network experience this problem?

    Thats correct. Internally users connecting via 192.168... is perfect(loads as it should).

    Internal users accessing internally but via the external ip = slow.

    External users outside of the network accessing via the external ip = slow too.

    Thanks

  6. #5
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    How fast are you able to download a big file (i.e. >200mb)?

  7. #6
    Just Joined!
    Join Date
    Jul 2012
    Posts
    9
    Quote Originally Posted by Kloschüssel View Post
    How fast are you able to download a big file (i.e. >200mb)?
    I just did a download from internally if thats what you meant, 200mb took about 28 seconds.

  8. #7
    Linux Newbie nplusplus's Avatar
    Join Date
    Apr 2010
    Location
    Charlotte, NC, USA
    Posts
    106
    For the page(s) you are trying to load, are all media (images, style sheets, scripts, videos, sounds) referenced relatively or absolutely from the local file system of the web server, or are there any resources that are referenced absolutely via non-local URLs? I am thinking that internal users have a complete view of internal and external DNS and resource locations, while external users have a limited view of both or either. If you are unsure, I know Firefox's Firebug plugin does a good job of showing the load time and location of all resources on a given page, which might give you an indication of where the page is hanging.

    Unresolvable/unretrievable elements can make the entire experience flop.

    N

  9. #8
    Linux Newbie
    Join Date
    Jun 2012
    Location
    SF Bay area
    Posts
    204
    The first thing that comes to mind is that the IP address you used probably changed when you switch ISP's (meaning the DSL upgrade). So it's possible that something odd is happening at the connection setup, like reverse DNS lookups taking longer. I'd try using "curl" to get timing metrics for the different phases of the HTTP fetch from both an internal and external client and compare the two. Here's a sample command you can use. Just replace "URL-GOES-HERE" with the real URL for you fetches.

    Code:
    curl -w '\nTotal=%{time_total} DNS=%{time_namelookup} Conn=%{time_connect} AppConn=%{time_appconnect} PreTrans=%{time_pretransfer} Redir=%{time_redirect} DatStart=%{time_starttransfer}\n' -o /dev/null --url URL-GOES-HERE
    Kloschüssel likes this.

  10. #9
    Just Joined!
    Join Date
    Jul 2012
    Posts
    9
    Quote Originally Posted by cnamejj View Post
    The first thing that comes to mind is that the IP address you used probably changed when you switch ISP's (meaning the DSL upgrade). So it's possible that something odd is happening at the connection setup, like reverse DNS lookups taking longer. I'd try using "curl" to get timing metrics for the different phases of the HTTP fetch from both an internal and external client and compare the two. Here's a sample command you can use. Just replace "URL-GOES-HERE" with the real URL for you fetches.

    Code:
    curl -w '\nTotal=%{time_total} DNS=%{time_namelookup} Conn=%{time_connect} AppConn=%{time_appconnect} PreTrans=%{time_pretransfer} Redir=%{time_redirect} DatStart=%{time_starttransfer}\n' -o /dev/null --url URL-GOES-HERE

    The IP's definately changed when we changed from ADSL2 > Fibre.

    I ran the curl test, I ran it from my local client, and used the internal 192.168.0.x URL, that gave:

    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 40342 0 40342 0 0 15044 0 --:--:-- 0:00:02 --:--:-- 15047

    Total=2.682 DNS=0.000 Conn=0.001 AppConn=0.000 PreTrans=0.001 Redir=0.000 DatStart=2.600

    I then ran it from the same client but using the external IP. That gave:

    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 40342 0 40342 0 0 516 0 --:--:-- 0:01:18 --:--:-- 10098

    Total=78.093 DNS=0.000 Conn=0.016 AppConn=0.000 PreTrans=0.016 Redir=0.000 DatStart=75.492

    Does that tell me anything useful or?

  11. #10
    Just Joined!
    Join Date
    Jul 2012
    Posts
    9
    Quote Originally Posted by nplusplus View Post
    For the page(s) you are trying to load, are all media (images, style sheets, scripts, videos, sounds) referenced relatively or absolutely from the local file system of the web server, or are there any resources that are referenced absolutely via non-local URLs? I am thinking that internal users have a complete view of internal and external DNS and resource locations, while external users have a limited view of both or either. If you are unsure, I know Firefox's Firebug plugin does a good job of showing the load time and location of all resources on a given page, which might give you an indication of where the page is hanging.

    Unresolvable/unretrievable elements can make the entire experience flop.

    N

    Thanks for the advice. I've tried this. Basically I loaded the page via the external IP and using firebug.

    It shows the GET index.php(main file) and domain and remote ip as correct, and the timeline shows 1m 18 seconds.

    If I hover over the timeline it breaks down into:

    0s DNS Lookup
    19ms Connecting
    0ms Sending
    1min 18Secs Waiting
    20ms receiving

    So its showing a huge waiting time. Any idea what that could be down to?

    It states: Waiting = Waiting for the response (till the first byte is received from the server).

    Could that be due to the processing that is taking place doing all the internal calculations/pulling data from the DB and so forth? Even if it is though, its still huge compared to internal.

    Thanks

Page 1 of 3 1 2 3 LastLast

Posting Permissions

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