WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Topic started by: 92merc on August 02, 2017, 09:33:09 AM

Title: Site slow to load
Post by: 92merc on August 02, 2017, 09:33:09 AM
In the past week, my homepage has become really slow to load.  Sometimes it'll time out.  What's odd is if it does finally load and I go to my other pages besides the home, those load fairly quick.

So my suspicion is some script on the homepage is slow to load.  My main suspicion is the forecast.  Can I change something to switch over to the old forecast method to test that theory?

I'm not positive it's that forecast either. Because once the homepage does load, I can go to my forecast full page and it loads quickly.  But that may have been cached too, I'm not sure.
Title: Re: Site slow to load
Post by: 92merc on August 02, 2017, 09:34:45 AM
Even more suspicion this morning towards the forecast being the issue.  Now my page is showing updated August 1.  Not 2nd.  Something on NWS end is behind.

http://www.bismarckweather.net/wxforecast.php
Title: Re: Site slow to load
Post by: BigOkie on August 02, 2017, 09:43:00 AM
https://www.wxforum.net/index.php?topic=32577.0

This script is affecting load times for anyone using the Cumulus template which relies on the navy.mil site for ephemeris data.  It goes out from time to time.  The temporary solution is to rename the file that calls the site (at the detriment of having incorrect sun/moon data until it's fixed).  That filename is get-USNO-sunmoon.php.  I just renamed it and changed php to old.

It's nothing to do with the template and everything to do with the availability of the website in question.
Title: Re: Site slow to load
Post by: saratogaWX on August 02, 2017, 02:57:17 PM
Yes it is due to server issues with api.usno.navy.mil (and aa.usno.navy.mil ).  I'd written them and received a reply this morning
Quote
Good morning,

We are still experiencing technical difficulties with our website. We hope it will be back soon.

Respectfully,
MRCF

________________________________________
From: portal @ usno.navy.mil
Sent: Tuesday, August 01, 2017 1:17 PM
To: NAVOBSY_AA-Help
Subject: Astronomical data services

Your E-Mail Address
webmaster @ saratoga-weather.org

Astronomy Topics
- Astronomical data services

Question
<div>It appears that api.usno.navy.mil and http://aa.usno.navy.mil/data/docs/RS_OneDay.php are not working.
<br />
<br />Please give the webserver(s) a kick to get them started again.
<br />
<br />This has been going on for several days.</div>

It was up for a bit this morning, but seems to be kranky again right now.  Sigh...
Title: Re: Site slow to load
Post by: 92merc on August 02, 2017, 03:13:52 PM
Call Trump.  He seems to be in charge of military operations.  :potstirr

Thanks for the confirmation.
Title: Re: Site slow to load
Post by: saratogaWX on August 02, 2017, 05:28:48 PM
I put together a test page that compares the Sun/Moon data from the USNO to that provided by various weather software and scripts.

(https://saratoga-weather.org/2017-08-02_moon-compare.jpg)

As you can see, not all the software provides all the data needed.  The blue bars highlight the needed data for the Saratoga template.
The red boxes highlight that data as missing from the software/script.

Also note the variations in the times v.s. the data from the USNO (for my latitude/longitude).  That's kinda why I decided to use the USNO as the prime source.