Author Topic: Any timeout code for METAR  (Read 435 times)

0 Members and 1 Guest are viewing this topic.

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6370
    • Valentine Nebraska's Real-Time Weather
Any timeout code for METAR
« 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?
Randy

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Any timeout code for METAR
« Reply #1 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.
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: 6370
    • Valentine Nebraska's Real-Time Weather
Re: Any timeout code for METAR
« Reply #2 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.
Randy

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6370
    • Valentine Nebraska's Real-Time Weather
Re: Any timeout code for METAR
« Reply #3 on: May 10, 2018, 04:05:12 PM »
So far so good after updating 'get-metar-conditions-inc.php'.  8-)
Randy

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Any timeout code for METAR
« Reply #4 on: May 10, 2018, 06:48:04 PM »
Cool... don't forget to update the other scripts needing updates too... :)
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