WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Topic started by: ValentineWeather on May 09, 2018, 11:22:08 PM

Title: Any timeout code for METAR
Post by: ValentineWeather on May 09, 2018, 11:22:08 PM
METAR conditions has caused site hang seems like forever and has been worse lately. If I comment out META in Settings-weather.php, website loads rapidly so question is does anyone have some code that can bypass METAR if it doesn't load in about 2 seconds?
Title: Re: Any timeout code for METAR
Post by: saratogaWX on May 10, 2018, 01:13:50 AM
Looking at check-fetch-times.php?show=versions on your site shows you are running a downlevel version of get-metar-conditions-inc.php -- the current version uses cURL for fetching and so better handles the timeouts for funky servers.  tgftp.nws.noaa.gov has been having some issues lately.. I think they may be migrating to new server(s) and haven't quite got it fixed yet.

I suggest you update the script(s) to current versions.. it will likely help.
Title: Re: Any timeout code for METAR
Post by: ValentineWeather on May 10, 2018, 08:55:22 AM
Thanks Ken  =D>....I don't know how I still had older version but glad I asked, site load hang has been occurring for some time. I turned conditions icon back on so will see how this newer version does.
Title: Re: Any timeout code for METAR
Post by: ValentineWeather on May 10, 2018, 04:05:12 PM
So far so good after updating 'get-metar-conditions-inc.php'.  8-)
Title: Re: Any timeout code for METAR
Post by: saratogaWX on May 10, 2018, 06:48:04 PM
Cool... don't forget to update the other scripts needing updates too... :)