Page 1 of 1

WXQUAKES PROBLEM??

Posted: Sun 14 Jan 2018 7:09 pm
by acatalano
I updated my website termplates for boulderwx.com on January 9. One of the most attractive additions IMHO is the earthquake map feature. I had a google maps API key etc., and quickly got it working fine. However since then I've noticed that most of the time the map does not display and What does display is:

"The USGS feed for earthquakes was not available at this time."

Of course I can follow the link to USGS and there is a map that displays there. So my question is...is the USGS site just too busy or flaky or is it possible I have a problem? I have set the debug switch in quake-json but I'm not getting any error messages. I also manually added my lat & log inside wxquakes.php but nothing has worked so far. I haven't seen a map in several days so I thought I'd ask...anyone else having a problem?

Re: WXQUAKES PROBLEM??

Posted: Sun 14 Jan 2018 11:11 pm
by ConligWX
Of course I can follow the link to USGS and there is a map that displays there.
from your website or another PC? as you website is not loading data, then perhaps it is having problems accessing the URL.

can you post/attach you wxquake.php file here.

Re: WXQUAKES PROBLEM??

Posted: Sun 14 Jan 2018 11:20 pm
by saratogaWX
Looking at the view-source for your wxquake.php page shows you're running the current version of the script
<!-- quake-json.php V1.13 - 30-May-2017 -->
<!-- lat=40.0652777 long=-105.32666 dist=2000 mag=1.0 distanceDisplay ='mi' -->
<!-- loading ./cache/quakesjson.txt from https://earthquake.usgs.gov/earthquakes ... ek.geojson -->
<!-- curl fetching 'https://earthquake.usgs.gov/earthquakes ... ek.geojson' -->
<!-- HTTP stats: RC=0 dest= port=0 (from sce=)
Times: dns=0.000 conn=0.000 pxfer=0.000 total=0.000 secs -->
<!-- headers returned:

-->
but... the curl fetch is failing (without an error message or a curl failure code). It is just not returning data, so the "The USGS feed for earthquakes was not available at this time" message is displayed.

What you should see is
<!-- loading ./cache/quakesjson.txt from https://earthquake.usgs.gov/earthquakes ... ek.geojson -->
<!-- curl fetching 'https://earthquake.usgs.gov/earthquakes ... ek.geojson' -->
<!-- HTTP stats: RC=200 dest=23.33.171.50
Times: dns=0.113 conn=0.127 pxfer=0.171 get=0.171 total=0.342 secs -->
<!-- loading finished. -->
<!-- data last modified Sun, 14 Jan 2018 23:02:15 GMT -->
<!-- Update time = Sun, 14-Jan-2018 23:02:15 GMT UTC-->
<!-- Update time = Sun, 14-Jan-2018 15:02:15 PST Local-->
<!-- content length=831096 -->
<!-- found 1167 earthquake records -->
Since your advforecast2.php script uses curl with https successfully (to api.weather.gov), I suspect that the webserver is having a problem with either DNS or routing to the earthquake.usgs.gov website. Most likely, the latter.. a DNS issue usually results in a curl error message.

I'd check your error_log on the site and see what it says.. likely a curl fatal error is resulting in a truncated return of status data from the curl call with your PHP 5.6.33 webserver.

Re: WXQUAKES PROBLEM??

Posted: Sun 14 Jan 2018 11:25 pm
by ConligWX
DNS sounds the likely cause. mine is working fine.

Re: WXQUAKES PROBLEM??

Posted: Mon 15 Jan 2018 4:02 pm
by acatalano
Many thanks for the expert diagnosis. I examined the error log but see nothing associated with this problem. My web host does require me to open up outgoing channels, but the only ones I see are associated with AKAMAI so I think those are associated with a webcrawler. I'll contact the support folks at the web host and see if they can help.

Re: WXQUAKES PROBLEM??

Posted: Mon 15 Jan 2018 5:01 pm
by acatalano
Problem solved! Looks like Akamai is just a provider. Unblocking the blocked outgoing requests solved the problem. It's odd that it worked for several days then stopped. Thanks for all the expert help!

Re: WXQUAKES PROBLEM??

Posted: Mon 15 Jan 2018 5:02 pm
by steve
Akamai is a Content Delivery Network. It’s quite possible that USGS use it for their web services.