Author Topic: Slow loading main index (Update usno.mil applications server is down fix below )  (Read 10023 times)

0 Members and 1 Guest are viewing this topic.

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6364
    • Valentine Nebraska's Real-Time Weather
Did this last week also takes 30 seconds to load. But if I remove dashboard from page it loads fast. Is this a server side issue or something else. My other website is doing same thing on same host. It cleared up later in the evening last time this happened. 

Thanks for any ideas on this. I use Go daddy as web host.

Update
Temporary fix until back up: If website is hanging depends on host.  (2-34 seconds)
rename (on your website) get-USNO-sunmoon.php to get-USNO-sunmoon-temp.php
Google link to test when server is back up: Check application links https://www.google.com/#q=www.usno.navy.mil%2Fusno%2Fastronomical-applications
Once mil links are back working, rename get-USNO-sunmoon.php to normal
« Last Edit: November 24, 2016, 05:27:51 AM by ValentineWeather »
Randy

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Slow loading main index with ajax dashboard
« Reply #1 on: November 22, 2016, 04:49:31 PM »
The page timed out for me. Some script loaded by the ajax dashboard is taking very long to load.
You could go to the code and try to find any external links and then commenting them out one by one to see which one it is that is slowing it down. That might help to find the cause of the problem.

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6364
    • Valentine Nebraska's Real-Time Weather
Re: Slow loading main index with ajax dashboard
« Reply #2 on: November 22, 2016, 05:02:33 PM »
Jáchym do you mean ajax-dashboard.php? When I remove the same code from my other website index.php it speeds up also.  http://www.pageweather.com/
Randy

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Slow loading main index with ajax dashboard
« Reply #3 on: November 22, 2016, 05:06:32 PM »
As Jachym says, your site is loading very slowly right now.. 40 seconds+ for the main page.

Doing a view-source shows
Quote
<!-- get-USNO-sunmoon.php - Version 2.01 - 29-Jul-2015 -->
<!-- loading ./cache/USNO-moondata.txt from http://api.usno.navy.mil/rstt/oneday?date=today&coords=42.8749,-100.5634&tz=-6 -->
<!-- GET /rstt/oneday?date=today&coords=42.8749,-100.5634&tz=-6 HTTP/1.1
      Host: api.usno.navy.mil  Port: 80 IP=api.usno.navy.mil-->
<!-- Network error: php_network_getaddresses: getaddrinfo failed: Name or service not known (0) -->
<!-- HTTP stats:  dns=16.436 conn=18.018 put=n/a get( blocks)=n/a close=n/a total=34.454 secs -->
<!-- fetch function elapsed= 35 secs. -->
<!-- loading finished. -->
<!-- processing JSON entries for Moon data -->
so 34 seconds is due to your webserver's inability to access api.usno.navy.mil, first with a dns lookup which should take <<0.1 second took 16 seconds to time out.  Then it tried to connect to api.usno.navy.mil by name (instead of IP address) and so took an additional 18 seconds to fully time out and not return results.

You should contact your hoster's tech support and ask them to do

dig api.usno.navy.mil

on the webserver (via shell) and do the diagnosis/fix as needed.

Meanwhile, to get your homepage to load quicker (but sacrifice some of the sun/moon data), just rename (on your website) get-USNO-sunmoon.php to get-USNO-sunmoon-temp.php and the ajax-dashboard will not try to use the USNO values, but instead use the values provided in the tables in common.php -- won't be quite as accurate for moon-phase, and moonrise/moonset will be omitted, but your page should load much quicker.  Reverse the rename above when they get the DNS fixed on your webserver.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6364
    • Valentine Nebraska's Real-Time Weather
Re: Slow loading main index with ajax dashboard
« Reply #4 on: November 22, 2016, 05:13:03 PM »
Will do Ken, thanks a million. I'll report back what they said and if I have issues with temporary fix. Like figure out. :-)
Thanks also Jáchym.
Randy

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6364
    • Valentine Nebraska's Real-Time Weather
Re: Slow loading main index with ajax dashboard
« Reply #5 on: November 22, 2016, 05:26:26 PM »
Ken your fix took care of problem. I'll call tech support and let them know whats going on. Thanks again
Randy

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6364
    • Valentine Nebraska's Real-Time Weather
Re: Slow loading main index with ajax dashboard
« Reply #6 on: November 22, 2016, 06:06:35 PM »
Well the godaddy tech says he can't pull any DNS information up on api.usno.navy.mil and asked if there was an alternative address I could use. I told him its been working but he insisted it doesn't exist.  #-o
Randy

Offline lrosenman

  • Contributor
  • ***
  • Posts: 148
    • Siena Weather
Re: Slow loading main index with ajax dashboard
« Reply #7 on: November 22, 2016, 06:14:32 PM »
querying google's name servers ALSO gives the timeout, I've sent a note via
http://www.navy.mil's about/contact us link.

thebighonker.lerctr.org /home/wview/saratoga $ host api.usno.navy.mil 8.8.8.8
;; connection timed out; no servers could be reached
thebighonker.lerctr.org /home/wview/saratoga $ host usno.navy.mil 8.8.8.8
;; connection timed out; no servers could be reached
thebighonker.lerctr.org /home/wview/saratoga $

« Last Edit: November 22, 2016, 06:27:03 PM by lrosenman »

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6364
    • Valentine Nebraska's Real-Time Weather
Re: Slow loading main index with ajax dashboard
« Reply #8 on: November 22, 2016, 06:22:32 PM »
querying google's name servers ALSO gives the timeout, I/ve sent a note via
http://www.navy.mil's about/contact us link.

thebighonker.lerctr.org /home/wview/saratoga $ host api.usno.navy.mil 8.8.8.8
;; connection timed out; no servers could be reached
thebighonker.lerctr.org /home/wview/saratoga $ host usno.navy.mil 8.8.8.8
;; connection timed out; no servers could be reached
thebighonker.lerctr.org /home/wview/saratoga $

Thanks for the info.
Randy

Offline Otis

  • (aka Paul)
  • Forecaster
  • *****
  • Posts: 724
    • Lake Huron Weather
Re: Slow loading main index with ajax dashboard
« Reply #9 on: November 23, 2016, 03:16:40 AM »
I have been experiencing the same problem - slow load time for home page.  I made the temporary change you suggested Ken and that did improve the load time.

I will contact my Host as you suggested Ken and I too will report back.

CW3699

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6364
    • Valentine Nebraska's Real-Time Weather
Re: Slow loading main index with ajax dashboard
« Reply #10 on: November 23, 2016, 06:52:20 AM »
Otis the problem is they are down. Follow this link to Google and try any of the applications all are dead links.

 https://www.google.com/#q=www.usno.navy.mil%2Fusno%2Fastronomical-applications
Randy

Offline Otis

  • (aka Paul)
  • Forecaster
  • *****
  • Posts: 724
    • Lake Huron Weather
Re: Slow loading main index with ajax dashboard
« Reply #11 on: November 23, 2016, 07:01:22 AM »
Copy that!  Thanks for the update.

CW3699

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6364
    • Valentine Nebraska's Real-Time Weather
Re: Slow loading main index with ajax dashboard
« Reply #12 on: November 23, 2016, 07:12:24 AM »
It went down for about 24 hours a week ago also so they are having issues. Surprised more haven't noticed unless there is a different way of getting data or settings for bypassing if no response in couple seconds would be nice. 
Randy

Offline Otis

  • (aka Paul)
  • Forecaster
  • *****
  • Posts: 724
    • Lake Huron Weather
Re: Slow loading main index with ajax dashboard
« Reply #13 on: November 23, 2016, 07:16:27 AM »
Another page affected is the wxAstronomy.php.  I went ahead and made the same temporary change that Ken suggested and the page loads fine now.  Will keep an eye on the USNO site to see what happens.

I too am surprised others have not mentioned this.  Mine started about a week ago maybe, thought it might have just been on my end.  Thanks for bringing it up.

CW3699

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Slow loading main index with ajax dashboard
« Reply #14 on: November 23, 2016, 07:33:31 AM »
Thats why I used scripts to calculate this in MT rather then getting data from external sources. It is true that it is probably slightly less accurate (but we are talking about a difference of a few seconds per year), but is not affected by this.

Recently there was another thread about this, the USNO site seems to be relatively unreliable.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Slow loading main index with ajax dashboard
« Reply #15 on: November 23, 2016, 12:53:48 PM »
It appears that it's the DNS for usno.navy.mil that is unstable -- it's returning the error 'Nameserver has a problem and can't talk right now'.  When the DNS lookup fails, different hosters respond differently to it.. some may time out in 2 seconds.. others take 16 seconds.

I think that the hostmaster at navy.mil has been apprised of the problem.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6364
    • Valentine Nebraska's Real-Time Weather
Re: Slow loading main index with ajax dashboard
« Reply #16 on: November 23, 2016, 01:07:06 PM »
Thanks Ken explains why so many didn't see the issue.
Randy

Offline lrosenman

  • Contributor
  • ***
  • Posts: 148
    • Siena Weather
the DNS is back.

thebighonker.lerctr.org /home/wview/saratoga $ host api.usno.navy.mil
api.usno.navy.mil has address 199.211.133.93
thebighonker.lerctr.org /home/wview/saratoga $


Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6364
    • Valentine Nebraska's Real-Time Weather
the DNS is back.

thebighonker.lerctr.org /home/wview/saratoga $ host api.usno.navy.mil
api.usno.navy.mil has address 199.211.133.93
thebighonker.lerctr.org /home/wview/saratoga $

It was and now its back down, UGH!
Randy

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Seems like this page is highly unreliable, I would maybe consider not using it at all.

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6364
    • Valentine Nebraska's Real-Time Weather
Seems like this page is highly unreliable, I would maybe consider not using it at all.

Considering it.
Randy

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
As I said previously, I dont really see the point anyway - you can calculate moon phases, sun rises etc. just by a script. You dont need to get those times from some external source (which is what my template does). And i created 120 icons of the Moon in Photoshop, each slightly different and the script chooses the one that best matches the current phase - yes, of course it is not a "photo" of the current Moon, but it is an accurate representation.
Eg: http://www.meteotemplate.com/template/pages/astronomy/moonPhase.php

Offline dasman

  • Forecaster
  • *****
  • Posts: 491
    • Wx Peotone
Same issue here. Main Index page takes 30 or more seconds to load!!!
Dave Sommerfed
Peotone Illinois USA
CW7762, KILPEOT1
NWS COOP, CoCoRaHS, Spotter Network

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Or, if you really want to use this page then what I would do is set the timeout for it to something really low, like 5 seconds maximum. If the site does not respond within 5 seconds (which it should under normal circumstances) then it will just skip that part, so that would prevent these 30+ second load times.

Offline W3DRM

  • Forecaster
  • *****
  • Posts: 3360
    • Emmett Weather
Re: Slow loading main index with ajax dashboard
« Reply #24 on: November 26, 2016, 11:17:09 AM »
Otis the problem is they are down. Follow this link to Google and try any of the applications all are dead links.

 https://www.google.com/#q=www.usno.navy.mil%2Fusno%2Fastronomical-applications

I went to the above link and it gives me a message that the services have moved to a new address ("Our data services have moved here. Please update your bookmarks."). Not sure if this has anything to do with the issues we are all seeing but thought I would point out what I see at the moment.
Don - W3DRM - Emmett, Idaho --- Blitzortung ID: 808 --- FlightRadar24 ID: F-KBOI7
Davis Wireless VP2, WD 10.37s150,
StartWatch, VirtualVP, VPLive, Win10 Pro
--- Logitech HD Pro C920 webcam (off-line)
--- RIPE Atlas Probe - 32849

 

anything