Author Topic: Occasional Slow Load Times  (Read 743 times)

0 Members and 1 Guest are viewing this topic.

Offline scottct1

  • Senior Member
  • **
  • Posts: 57
    • Newington, CT Weather
Occasional Slow Load Times
« on: March 29, 2024, 03:32:36 PM »
Ok this one has me pulling out my air. 

Most of the time when I go to https://weather.satelliteguys.us the page immediately loads.

However sometimes when I goto the page only partly renders... then freezes (and freezes at different points) and then can take up to 60 seconds to finish loading.

My. host screwed up my PHP a few days ago, and reverted us back to 7, but now we are back on 8.2 again.  It is doing the same thing on either version of PHP.

I contacted my host and they say everything is fine...

So I got mad... I went out and got a BRAND NEW server, moved the site  over to the new server and it's the only thing currently on this server.  And it's still doing it.

When it does it, the check-fetch-times.php file looks like this... 

Code: [Select]
check-fetch-times.php Version 1.56 - 16-Mar-2024

Website PHP information

Running on webhost 'weather.satelliteguys.us' @ IP='154.38.162.185' (reverse IP Name='vmi1766483.contaboserver.net')
Webserver OS: Linux vmi1766483.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
PHP Version: 8.2.17 built for Linux
PHP cmd location: /opt/cpanel/ea-php82/root/usr/bin/php
Document root: /home/weather/public_html
Template root: /home/weather/public_html
allow_url_fopen = ON
allow_url_include = off
request_order = GP
Stream support for http is available
Stream support for https is available
Streams supported: compress.bzip2, compress.zlib, compress.zstd, data, file, ftp, ftps, glob, http, https, phar, php, zip
Socket transports: ssl, tcp, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3, udg, udp, unix

Checking access to key websites for your template set

This script will check the load times and the ability to save cache files for the included support scripts with your template package.

Included Settings.php time=55.763 secs.

Using lang=en as default for testing

--checking NWS Forecast URL --
Using first entry in Settings.php $SITE['NWSforecasts'] for test.
URL: https://api.weather.gov/points/41.6926,-72.721
Cache: ./cache/forecast-CAZ513-meta-json.txt
 curl fetching 'https://api.weather.gov/points/41.6926,-72.721'
 HTTP stats:  RC=200 dest=2600:1407:3c00:1689::116 port=443 (from sce=2605:a140:2176:6483::1)
      Times: dns=0.001 conn=0.008 pxfer=0.027 get=0.123 total=0.150 secs
RC=200, bytes=3707
Wrote 3707 bytes to ./cache/forecast-CAZ513-meta-json.txt successfully.
Test was SUCCESSFUL.
--end NWS Forecast URL check --

--checking NWS Warning Zone ATOM/CAP Feed --
Using Settings.php $SITE['noaazone'] entry for test.
URL: https://api.weather.gov/alerts/active.atom?zone=CAZ513
Cache: ./cache/nws-alerts-CAZ513.txt
 curl fetching 'https://api.weather.gov/alerts/active.atom?zone=CAZ513'
 HTTP stats:  RC=200 dest=2600:1407:3c00:1689::116 port=443 (from sce=2605:a140:2176:6483::1)
      Times: dns=0.001 conn=0.010 pxfer=0.059 get=0.094 total=0.153 secs
RC=200, bytes=1275
Data age=580646 sec 'Sat, 23 Mar 2024 00:00:00 GMT'
Wrote 1275 bytes to ./cache/nws-alerts-CAZ513.txt successfully.
Test was SUCCESSFUL.
--end NWS Warning Zone ATOM/CAP Feed check --

--checking UV Forecast from temis.nl --
Using Settings.php $SITE['UVscript'] entry for test.
URL: https://www.temis.nl/uvradiation/nrt/uvindex.php?lon=-72.71929169&lat=41.68506241
Cache: ./cache/uv-forecast.txt
 curl fetching 'https://www.temis.nl/uvradiation/nrt/uvindex.php?lon=-72.71929169&lat=41.68506241'
 HTTP stats:  RC=200 dest=52.16.73.3 port=443 (from sce=154.38.162.185)
      Times: dns=0.001 conn=0.102 pxfer=0.311 get=0.143 total=0.455 secs
RC=200, bytes=7002
Wrote 7002 bytes to ./cache/uv-forecast.txt successfully.
Test was SUCCESSFUL.
--end UV Forecast from temis.nl check --


Total time taken = 55.763 secs.
Elapsed 57 seconds.

PHP Version 8.2.17
Memory post_max_size 8M bytes.
Memory usage 487984 bytes.
Memory peak usage 564632 bytes.

Other than it taking 57 seconds to load it... everything looks fine on all the fetches.

I have not carried over any php, apache or mysql settings over to this new server.  Everything is at default.  I have Cpanel and WHM and can make changes if needed.

Most of the times it is running fine and here is what it looks like when its running fine.

Code: [Select]
check-fetch-times.php Version 1.56 - 16-Mar-2024

Website PHP information

Running on webhost 'weather.satelliteguys.us' @ IP='154.38.162.185' (reverse IP Name='vmi1766483.contaboserver.net')
Webserver OS: Linux vmi1766483.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
PHP Version: 8.2.17 built for Linux
PHP cmd location: /opt/cpanel/ea-php82/root/usr/bin/php
Document root: /home/weather/public_html
Template root: /home/weather/public_html
allow_url_fopen = ON
allow_url_include = off
request_order = GP
Stream support for http is available
Stream support for https is available
Streams supported: compress.bzip2, compress.zlib, compress.zstd, data, file, ftp, ftps, glob, http, https, phar, php, zip
Socket transports: ssl, tcp, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3, udg, udp, unix

Checking access to key websites for your template set

This script will check the load times and the ability to save cache files for the included support scripts with your template package.

Included Settings.php time=0.002 secs.

Using lang=en as default for testing

--checking NWS Forecast URL --
Using first entry in Settings.php $SITE['NWSforecasts'] for test.
URL: https://api.weather.gov/points/41.6926,-72.721
Cache: ./cache/forecast-CAZ513-meta-json.txt
 curl fetching 'https://api.weather.gov/points/41.6926,-72.721'
 HTTP stats:  RC=200 dest=2600:1407:1800:390::116 port=443 (from sce=2605:a140:2176:6483::1)
      Times: dns=0.022 conn=0.030 pxfer=0.053 get=0.017 total=0.071 secs
RC=200, bytes=3707
Wrote 3707 bytes to ./cache/forecast-CAZ513-meta-json.txt successfully.
Test was SUCCESSFUL.
--end NWS Forecast URL check --

--checking NWS Warning Zone ATOM/CAP Feed --
Using Settings.php $SITE['noaazone'] entry for test.
URL: https://api.weather.gov/alerts/active.atom?zone=CAZ513
Cache: ./cache/nws-alerts-CAZ513.txt
 curl fetching 'https://api.weather.gov/alerts/active.atom?zone=CAZ513'
 HTTP stats:  RC=200 dest=2600:1407:1800:390::116 port=443 (from sce=2605:a140:2176:6483::1)
      Times: dns=0.001 conn=0.008 pxfer=0.028 get=0.096 total=0.124 secs
RC=200, bytes=1274
Data age=581174 sec 'Sat, 23 Mar 2024 00:00:00 GMT'
Wrote 1274 bytes to ./cache/nws-alerts-CAZ513.txt successfully.
Test was SUCCESSFUL.
--end NWS Warning Zone ATOM/CAP Feed check --

--checking UV Forecast from temis.nl --
Using Settings.php $SITE['UVscript'] entry for test.
URL: https://www.temis.nl/uvradiation/nrt/uvindex.php?lon=-72.71929169&lat=41.68506241
Cache: ./cache/uv-forecast.txt
 curl fetching 'https://www.temis.nl/uvradiation/nrt/uvindex.php?lon=-72.71929169&lat=41.68506241'
 HTTP stats:  RC=200 dest=52.16.73.3 port=443 (from sce=154.38.162.185)
      Times: dns=0.012 conn=0.113 pxfer=0.325 get=0.126 total=0.451 secs
RC=200, bytes=7002
Wrote 7002 bytes to ./cache/uv-forecast.txt successfully.
Test was SUCCESSFUL.
--end UV Forecast from temis.nl check --


Total time taken = 0.002 secs.
Elapsed 1 seconds.

PHP Version 8.2.17
Memory post_max_size 8M bytes.
Memory usage 487856 bytes.
Memory peak usage 564504 bytes.

I went and downloaded all the files from Kens site, and have uploaded Settings.php, AltAjaxDashboardConfig6.php, ajaxWDwx3.js, ajaxdashboard.php. top.php, fdyoutmenux.xml, footer.php and others and it is still happening.

Not sure what's happening here or what else I can try, the error log files show nothing and it only happens every once in awhile.  I contacted support and they can find nothing wrong with the server.  I even had them wipe it and reload it and still same issue.

Any ideas?

Thank you!
Scott - NewingtonWeather.COM - Newington, Connecticut's Weather Source!
Davis Vantage Pro 2 Plus - WeatherFlow Tempest for Lightning - Weather-Display Software

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Occasional Slow Load Times
« Reply #1 on: March 29, 2024, 05:29:56 PM »
The key issue is
Quote
Included Settings.php time=55.763 secs.

The PHP instance shouldn't take that long to do
Quote
  $T_start = microtime_float();
  include_once("Settings.php");
  $T_stop = microtime_float();
  $settingsLoad = "Included Settings.php time=" . sprintf("%01.3f",round($T_stop - $T_start,3)) . " secs.</p>\n\n";
(the simple code in check-fetch-times.php).  It should look like your other sample
Quote
Included Settings.php time=0.002 secs.

When your webserver pauses a long time doing a simple filesystem include(), that's where the long delay comes from.. it's a webserver issue for your hoster to fix.
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 drrehak

  • Senior Member
  • **
  • Posts: 72
Re: Occasional Slow Load Times
« Reply #2 on: March 29, 2024, 09:04:10 PM »
I've been seeing the exact same random behavior starting on the 23rd, but sometimes load time of my main page is a couple minutes but usually under 60 seconds.  I'm self hosting and haven't made any web server changes; server diagnostics don't show anything.  I can load any other page from my site and any other page on the server while I'm waiting for the main page to load and they all load without any delay.
Dan Rehak | Pittsburgh PA
Davis Vantage Pro 2 Plus | Meteobridge Pro
Local Site | Raspberry Pi 4B

Offline scottct1

  • Senior Member
  • **
  • Posts: 57
    • Newington, CT Weather
Re: Occasional Slow Load Times
« Reply #3 on: March 29, 2024, 09:08:59 PM »
Yes that is about the same time it started happening to me as well.

The issue my host did was went into WHM's php and accidentally set our PHP back to 7, I just had to go back in and set it back to 8.  But it was doing it on 7 and 8.

Yes mine freezes like that too.

Wish there was a reason for it.  Contacted support again and again am told my system is fine. 

This is so odd.
Scott - NewingtonWeather.COM - Newington, Connecticut's Weather Source!
Davis Vantage Pro 2 Plus - WeatherFlow Tempest for Lightning - Weather-Display Software

Offline hcorrin

  • Contributor
  • ***
  • Posts: 136
    • Ballaugh Weather
Re: Occasional Slow Load Times
« Reply #4 on: March 30, 2024, 05:52:00 AM »
I’ve been seeing this and some times I get error 500
I tried turning off meteoalarm in this version https://www.hc-iom.co.uk/WD-AJAX3/index.php but that failed to load in 15 sec when I kill the load other non dashboard pages load ok ie https://www.hc-iom.co.uk/wxsim2/forecast.php and https://www.hc-iom.co.uk/info.php
Last time I checked the error logs I did see timeout errors will have to get fresh logs tonight when my laptop is on, note I am on a shared server but I do not how many others are on it

Offline scottct1

  • Senior Member
  • **
  • Posts: 57
    • Newington, CT Weather
Re: Occasional Slow Load Times
« Reply #5 on: March 30, 2024, 08:05:25 AM »
hcorrin,

I just tried your and am getting a server error. However with repeated reloads the site does load fine.

Code: [Select]
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at admin@hc-iom.co.uk to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

I am not getting any server errors on mine, so don't know if they are related issues or not.
« Last Edit: March 30, 2024, 08:13:45 AM by scottct1 »
Scott - NewingtonWeather.COM - Newington, Connecticut's Weather Source!
Davis Vantage Pro 2 Plus - WeatherFlow Tempest for Lightning - Weather-Display Software

Offline scottct1

  • Senior Member
  • **
  • Posts: 57
    • Newington, CT Weather
Re: Occasional Slow Load Times
« Reply #6 on: March 30, 2024, 08:24:03 AM »
hcorrin,

I was testing your site and the issue just happened again on both your AltAjaxDashboard 6 main site... AND it happened at the same time on your Saratoga Dashboard.

The main site reported back a 500 error, however the Saratoga dashboard loaded up fine after about 50 seconds with no error.  (Both the 500 error and the Saratoga page popped up at the exact same time.

There is something going on... that's for sure.  But since its happening to both the AltAjaxDashboard6 and the classic Saratoga script at the same time tells has me now more confused.

Scott - NewingtonWeather.COM - Newington, Connecticut's Weather Source!
Davis Vantage Pro 2 Plus - WeatherFlow Tempest for Lightning - Weather-Display Software

Offline scottct1

  • Senior Member
  • **
  • Posts: 57
    • Newington, CT Weather
Re: Occasional Slow Load Times
« Reply #7 on: March 30, 2024, 08:50:32 AM »
Got a private message from a user saying her believes that wxaqirss.php is causing the issue.   

He was having the same issue and was getting aqi errors.  (I posted in the scripts directory about a week ago I was having aqi errors as well, Ken had me update my get-aqi-rss.php which was an old version and the errors went away.).  But now thinking about it this is when the delay problems also cropped up.  I didn't give the delay problems much thought at first as I was having internet issues and chalked it up to that, but then days later when my internet was fixed and the issues was still happening I knew it was no longer and internet issues.

So now I need to figure out how to turn AQI off and see if thats it.

A sincere thank you to the person who PM'ed me with this tip. :)
Scott - NewingtonWeather.COM - Newington, Connecticut's Weather Source!
Davis Vantage Pro 2 Plus - WeatherFlow Tempest for Lightning - Weather-Display Software

Offline drrehak

  • Senior Member
  • **
  • Posts: 72
Re: Occasional Slow Load Times
« Reply #8 on: March 30, 2024, 09:02:38 AM »
Ditto on AQI being a possible cause.  Made the most recent changes a few days ago.
I've occasionally gotten this:
Code: [Select]
Warning: DOMDocument::load(): Opening and ending tag mismatch: meta line 27 and head in http://feeds.enviroflash.info/rss/forecast/113.xml, line: 28 in /var/www/html/weather/st/wxaqirss.php on line 262

Warning: DOMDocument::load(): attributes construct error in http://feeds.enviroflash.info/rss/forecast/113.xml, line: 33 in /var/www/html/weather/st/wxaqirss.php on line 262

Warning: DOMDocument::load(): Couldn't find end of Start Tag script line 33 in http://feeds.enviroflash.info/rss/forecast/113.xml, line: 33 in /var/www/html/weather/st/wxaqirss.php on line 262

Warning: DOMDocument::load(): StartTag: invalid element name in http://feeds.enviroflash.info/rss/forecast/113.xml, line: 38 in /var/www/html/weather/st/wxaqirss.php on line 262

Warning: DOMDocument::load(): Opening and ending tag mismatch: meta line 25 and html in http://feeds.enviroflash.info/rss/forecast/113.xml, line: 42 in /var/www/html/weather/st/wxaqirss.php on line 262

Warning: DOMDocument::load(): Premature end of data in tag meta line 24 in http://feeds.enviroflash.info/rss/forecast/113.xml, line: 42 in /var/www/html/weather/st/wxaqirss.php on line 262

Warning: DOMDocument::load(): Premature end of data in tag meta line 23 in http://feeds.enviroflash.info/rss/forecast/113.xml, line: 42 in /var/www/html/weather/st/wxaqirss.php on line 262

Warning: DOMDocument::load(): Premature end of data in tag meta line 4 in http://feeds.enviroflash.info/rss/forecast/113.xml, line: 42 in /var/www/html/weather/st/wxaqirss.php on line 262

Warning: DOMDocument::load(): Premature end of data in tag head line 3 in http://feeds.enviroflash.info/rss/forecast/113.xml, line: 42 in /var/www/html/weather/st/wxaqirss.php on line 262

Warning: DOMDocument::load(): Premature end of data in tag html line 2 in http://feeds.enviroflash.info/rss/forecast/113.xml, line: 42 in /var/www/html/weather/st/wxaqirss.php on line 262
Didn't see anything obvious in the feed XML, but didn't try to run it through a validator.

Dan Rehak | Pittsburgh PA
Davis Vantage Pro 2 Plus | Meteobridge Pro
Local Site | Raspberry Pi 4B

Offline drrehak

  • Senior Member
  • **
  • Posts: 72
Re: Occasional Slow Load Times
« Reply #9 on: March 30, 2024, 10:46:35 AM »
So I reloaded my AQI page and the errors went away.
Ran the raw XML when I didn't get errors through a validator and its OK.
The embedded xHTML validates.
Dan Rehak | Pittsburgh PA
Davis Vantage Pro 2 Plus | Meteobridge Pro
Local Site | Raspberry Pi 4B

Offline scottct1

  • Senior Member
  • **
  • Posts: 57
    • Newington, CT Weather
Re: Occasional Slow Load Times
« Reply #10 on: March 30, 2024, 11:34:58 AM »
When you say reloaded, what do you mean reloaded?  Like uploading the files again?

Has the issue come back?

I wonder if Ken can make it so it only tries to pull the AQI once an hour instead of each page load, as I am thinking perhaps the server we are getting the AQI stuff from is having issues and maybe occasionally sending bad data which is causing the freezing an acquisition of the AQI data to fail?

(Just thinking out loud)
Scott - NewingtonWeather.COM - Newington, Connecticut's Weather Source!
Davis Vantage Pro 2 Plus - WeatherFlow Tempest for Lightning - Weather-Display Software

Offline drrehak

  • Senior Member
  • **
  • Posts: 72
Re: Occasional Slow Load Times
« Reply #11 on: March 30, 2024, 12:13:10 PM »
Reload = page refresh -- no changes to site.  Don't know the AQI script well enough to understand how/if it caches or I'm getting new XML.

Right now its OK.  Hit the page and no errors.  Main page loads without delay.
Dan Rehak | Pittsburgh PA
Davis Vantage Pro 2 Plus | Meteobridge Pro
Local Site | Raspberry Pi 4B

Offline scottct1

  • Senior Member
  • **
  • Posts: 57
    • Newington, CT Weather
Re: Occasional Slow Load Times
« Reply #12 on: March 30, 2024, 12:14:48 PM »
Here is the top of my fetch-aqi-rss.php file.

Code: [Select]
// Version 1.01 - 21-Nov-2023- fix notice errata when AQI data fetch fails - saratoga-weather.org
// Version 1.02 - 26-Jan-2024 - fix issues when feed is not available
//Current Air Quality URL
$urlRealtime = "https://feeds.enviroflash.info/rss/realtime/56.xml";  //Hartford, CT - Current Air Quality
// Images Directory
$imagesDir = "./ajax-images";

If I pull it the following is shown... and if I validate it, it validates.

Code: [Select]
<rss version="2.0">
<channel>
<title>Hartford, CT - Current Air Quality</title>
<link>https://www.airnow.gov/</link>
<description>EnviroFlash RSS Feed</description>
<language>en-us</language>
<webMaster>dmc@airnowtech.org (AIRNow Data Management Center)</webMaster>
<pubDate>Sat, 30 Mar 2024 10:45:01 EST</pubDate>
<item>
<title>Hartford, CT - Current Air Quality</title>
<link>https://feeds.enviroflash.info/rss/realtime/56.xml?id=A05B4739-BDF7-5A7D-3E111B35E852404E</link>
<description>
<!--  Format data output  -->
<div xmlns="http://www.w3.org/1999/xhtml"> <table style="width: 350px;"> <tr> <td> <br /> </td> </tr> <tr> <td valign="top"> <div><b>Location:</b> Hartford, CT</div><br /> <div> <b>Current Air Quality:</b> 03/30/24 11:00 AM EDT<br /><br /> <div> Good - 39 AQI - Ozone<br /> <br /> Good - 8 AQI - Particle Pollution (2.5 microns)<br /> <br /> Good - 4 AQI - Particle Pollution (10 microns)<br /> <br /> </div> </div> <div><b>Agency:</b> Connecticut Dept. of Energy and Environmental Protection </div><br /> <div><i>Last Update: Sat, 30 Mar 2024 10:45:01 EST</i></div> </td> </tr> </table> </div>
</description>
</item>
</channel>
</rss>

Now going into my wxaqirss.php file I see the following...  These all check out when I test them.

Code: [Select]
//Select your URLs at the following location http://feeds.enviroflash.info/
//Forecast URL
$urlForecast = "http://feeds.enviroflash.info/rss/forecast/56.xml";  //Hartford, CT
//Action Day URL
$urlActionDay = "http://feeds.enviroflash.info/rss/actionDay/56.xml";  //Hartford, CT
//Current Air Quality URL
$urlRealtime = "http://feeds.enviroflash.info/rss/realtime/56.xml";  //Hartford, CT
// Your City, State Name
$cityname= "Newington, CT";[code]


However moving forward it seems like we have an issue here...  and I dont know if they changed the site but I can't find how to get this information from the site as specified.

[code]// Images can be found here:  http://www.airnow.gov (find your city)
// "Current AQI" image from airnow.gov found on your city page
$hourlyaqiimage = "http://files.airnowtech.org/airnow/today/cur_aqi_vt_nh_ma_ct_ri_me.jpg";
// "Forecast" image from airnow.gov found on your city page
// Example: http://www.epa.gov/airnow/today/forecast_aqi_20100401_va_wv_md_de_dc.jpg  (20100401 will change daily)
// So, grab "http://www.epa.gov/airnow/today/forecast_aqi_20" then grab the end "_va_wv_md_de_dc.jpg"
// Code below will automatically insert the appropriate year, month and day (ie. "100401")
$forecastimagebegin = "http://files.airnowtech.org/airnow/today/forecast_aqi_20";
$forecastimageend = "_vt_nh_ma_ct_ri_me.jpg";
// "AQI Animation" image from airnow.gov found on your city page
$hourlyaqianimation = "https://files.airnowtech.org/airnow/today/anim_aqi_vt_nh_ma_ct_ri_me.gif";

So  http://files.airnowtech.org/airnow/today/forecast_aqi_20240330_vt_nh_ma_ct_ri_me.jpg will come back with...

Code: [Select]
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Key>airnow/today/forecast_aqi_20240330_vt_nh_ma_ct_ri_me.jpg</Key>
<RequestId>A4CQKCM5XYWGTHH8</RequestId>
<HostId>rO9ySu+GCCBPf3NtQkTVRp8+IDqnUIlF90lrOYTSEuoL+grm9lLB0D7hbQx/OOus5z5eC37PUvo=</HostId>
</Error>

And https://files.airnowtech.org/airnow/today/anim_aqi_vt_nh_ma_ct_ri_me.gif comes back as ...

Code: [Select]
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Key>airnow/today/anim_aqi_vt_nh_ma_ct_ri_me.gif</Key>
<RequestId>WFGHQN0QCE8G2YBK</RequestId>
<HostId>rxw2ueCmuj5ejnp+KE5ft27EW9im7ayJUu6RcXIVWQHKYzmaNd5daLy8VQ0ZrMUlQWrVAo0AMqU=</HostId>
</Error>

So there seems to be an issue there, but I am not 100% sure.  Maybe there is a new wxaqirss.php out there and I am using an old one?

Scott - NewingtonWeather.COM - Newington, Connecticut's Weather Source!
Davis Vantage Pro 2 Plus - WeatherFlow Tempest for Lightning - Weather-Display Software

Offline scottct1

  • Senior Member
  • **
  • Posts: 57
    • Newington, CT Weather
Re: Occasional Slow Load Times
« Reply #13 on: March 30, 2024, 12:29:46 PM »
Ok I just went into the AllAjaxDashboardConfig6.php file and set $useAQI  to false;

Page is loading instantly, but time will tell. :)

Let's see if that helps.  Hopefully someone can figure out this wxaqirss.php issue.  I am thinking AirNow.gov changed something.
Scott - NewingtonWeather.COM - Newington, Connecticut's Weather Source!
Davis Vantage Pro 2 Plus - WeatherFlow Tempest for Lightning - Weather-Display Software

Offline drrehak

  • Senior Member
  • **
  • Posts: 72
Re: Occasional Slow Load Times
« Reply #14 on: March 30, 2024, 12:42:03 PM »
Also running 1.02 of get-aqi-rss.php

Had the same problem getting the PIT images.
I suspect they disappeared.

Commented out the code from the wxaqirss.php that rendered the images, so my page rendering stops at the forecast (commented out from the table that starts with "Script courtesy..." to the ending </div>.  Shouldn't be trying to fetch the images.

Getting the errors and slow load with this commented out, so it shouldn't be an issue with no images.  relayweather.com doesn't seem to point to anything weather related now.

Dan Rehak | Pittsburgh PA
Davis Vantage Pro 2 Plus | Meteobridge Pro
Local Site | Raspberry Pi 4B

Offline BKS97

  • Senior Contributor
  • ****
  • Posts: 178
    • Sartell East Weather
Re: Occasional Slow Load Times
« Reply #15 on: March 30, 2024, 12:47:11 PM »
My experience is this: the wxaqirss.php script was working fine until a few weeks ago.  As I worked with it, reinstalling, etc., I noticed that it would work occasionally but after a while would show “no data” and errors.   When this occurred my site also loaded very slowly.  I decided to remove the script from my site for the time being and haven’t had any further problems with slow loading at least that I can tell.

Offline drrehak

  • Senior Member
  • **
  • Posts: 72
Re: Occasional Slow Load Times
« Reply #16 on: March 30, 2024, 02:00:38 PM »
Another data point.  Just refreshed my main page -- very slow.  Did a load of wxaqirss at the same time -- also slow.  Both finished loading together.  No errors in wxaqirss. Refreshed again and fast even in multiple browsers.

Wait 30 seconds. both slow, and the errors in wxaqirss are back. 
Slow loading currently repeatable.

Getting time outs on direct call to https://feeds.enviroflash.info/rss/forecast/113.xml
« Last Edit: March 30, 2024, 02:04:14 PM by drrehak »
Dan Rehak | Pittsburgh PA
Davis Vantage Pro 2 Plus | Meteobridge Pro
Local Site | Raspberry Pi 4B

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Occasional Slow Load Times
« Reply #17 on: March 30, 2024, 02:29:49 PM »
Your pages will load slowly when they do access to external websites (like feeds.enviroflash.info) and your webserver's connection to the URL is having issues. 

My slightly revised get-aqi-rss.php from the alternative dashboard script set doesn't use caching -- it only fixed the errata when a fetch failed or the XML was faulty.

The 3rd-party wxaqirss.php appears to similarly not cache the results, so it loads from the problematic URL each time the page is viewed.

That load time to the external URL is the root-cause of the delays loading the page.
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 scottct1

  • Senior Member
  • **
  • Posts: 57
    • Newington, CT Weather
Re: Occasional Slow Load Times
« Reply #18 on: March 30, 2024, 02:34:02 PM »
But why did it start happening to us all about the same time with no changes?   It started with the error messages.

I don't think the issue is on our servers, as we are all on different servers.

Just trying to understand.
Scott - NewingtonWeather.COM - Newington, Connecticut's Weather Source!
Davis Vantage Pro 2 Plus - WeatherFlow Tempest for Lightning - Weather-Display Software

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Occasional Slow Load Times
« Reply #19 on: March 30, 2024, 03:09:02 PM »
The problem is with feeds.environflash.info site.  Each individual webserver/website experienced slow loading times for the XML request, and that time was reflected in the loading of your page(s) which had scripts accessing feeds.environflash.info.

Sometimes, these delays are due to routing issues in the internet from your webserver's IP address to their IP address. 
Sometimes, it is in the feeds.environflash.info webserver itself (slow to connect, slow to offer up data, etc.).  With the current two scripts (my get-aqi-rss.php and the 3rd-party wxaqirss.php script), the delays are reflected in your page load times.

It's probably not a problem with your specific webserver due to multiple sites having the same issue -- it's likely a problem with feeds.enviroflash.info (and you can't 'fix' that.. they have to fix the issue there).
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 drrehak

  • Senior Member
  • **
  • Posts: 72
Re: Occasional Slow Load Times
« Reply #20 on: March 30, 2024, 03:22:29 PM »
Tracert to https://feeds.enviroflash.info/ takes me to 108.166.244.2 where it stops after about 8 hops, so the problem isn't local. 

Code: [Select]
tracert feeds.enviroflash.info

Tracing route to airnow-alb-166947887.us-east-2.elb.amazonaws.com [3.132.137.46]
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  unifi.chezdan [10.132.101.1]
  2     3 ms     4 ms     3 ms  lo0-100.PITBPA-VFTTP-314.verizon-gni.net [72.77.95.1]
  3     *        *        *     Request timed out.
  4     2 ms     3 ms     8 ms  0.ae2.GW1.PIT8.ALTER.NET [140.222.8.81]
  5     *        *        *     Request timed out.
  6    19 ms    18 ms    18 ms  108.166.252.47
  7     *        *        *     Request timed out.

Haven't tried to change my DNS to see it that's the problem to try to get another routing to AWS.  Unclear to me if its AWS or some intermediary.  But getting similar traces from different devices (Verizon vs TMobile as ISP).
Dan Rehak | Pittsburgh PA
Davis Vantage Pro 2 Plus | Meteobridge Pro
Local Site | Raspberry Pi 4B

Offline scottct1

  • Senior Member
  • **
  • Posts: 57
    • Newington, CT Weather
Re: Occasional Slow Load Times
« Reply #21 on: March 30, 2024, 03:52:51 PM »
Since turning the AQI off in the AltAjaxConfig6.php file the wxaqirss.php has been working fine for me and has been populating the data fine in it.

https://weather.satelliteguys.us/wxaqirss.php

So now the AQI is not showing on my homepage, which is ok with me, and the seperate page is working again.  And I have not had any slowdowns.

I am starting to wonder if their servers are rate limiting connections?  (If yes, like Ken said, nothing we can do as it is out of our control)

I do notice they now offer widgets... https://www.airnow.gov/aqi-widgets/. I wonder if I can replace my AQI on my homepage with one of these widgets which seem to come off a different server.

Maybe my wife will stop bugging me to do stuff here around the house and I will find time to play. :D
Scott - NewingtonWeather.COM - Newington, Connecticut's Weather Source!
Davis Vantage Pro 2 Plus - WeatherFlow Tempest for Lightning - Weather-Display Software

Offline scottct1

  • Senior Member
  • **
  • Posts: 57
    • Newington, CT Weather
Re: Occasional Slow Load Times
« Reply #22 on: March 30, 2024, 04:23:43 PM »
Ok I have Air Quality back on my. homepage, without the worry of a slowdown. :)

Here is how I did it.  (Make sure to backup your files before doing any of this. Also note that if you replace your ajax-dashboard6 you will lost this change)

1) Open ajax-dashboard6.php

2) Find and remove the following...

Code: [Select]
<?php if ($useAQI) {  //  Show Air Quality Index - PLASE YOUR CODE IN PLACE OF THIS SECTION AND START HERE Removing the line above too! ?>
                <td align="center" valign="middle" rowspan="3">
        <table border="0" cellpadding="2" cellspacing="0">
            <tr>
                <td class="data2" style="text-align: center; font-size: 12px;">
                <?php
                    
if ($realValue1 == "") {
                        echo 
"";
                    } else {
                        echo 
"<span style=\"font-size:90%; \">Quality<br/>Index<sup>6</sup>:</span><span style=\"font-size: 150%; font-weight:bold;\"><br/>" $realValue1 "</span><br/><br/>";
                    }
                    if (
$realValue1 == "") {
                        echo 
"<span style=\"font-size:85%; \">Data Not<br />Available</span><br /><br /><img src=\"./ajax-images/AQI0.jpg\" alt=\"Data Not Available\" />";
                    } else {
                        
getGraphic($realIndex1$aqiLevels$aqiGraphic$imagesDir);
                    }
                
?>

                <br /><?php langtrans(&#39;Density&#39;); ?>:<br />
                <?php echo $airdensity " kg/m<sup>3</sup>" ?>
                </td>
            </tr>
        </table>
                </td>
            </tr>
<?php // end $showAQI - PLASE YOUR CODE INPLACE OF THIS SECTION AND END HERE  ?>

Now replace it with the following.  Customize the URL with your local big city and state, and the city and state after can be a different city name whch will display if your weather station isn't in that major city. 

For example, my biggest local town where they have AQI data for is Hartford, CT.   So I put in Hartford for my city and my state is CT so I put in CT.  Now after the n= I put in my local town where my site is for which in this case is Newington, CT. so it looks like this n=Newington,%20CT so now the AQI is shown as being for Newington, CT instead of Hartford, CT.

Code: [Select]
<?php if ($useAQI) {  //  Show Air Quality Index - PLASE YOUR CODE IN PLACE OF THIS SECTION AND START HERE Removing the line above too! ?>
                <td align="center" valign="middle" rowspan="3">
        <table border="0" cellpadding="2" cellspacing="0">
            <tr>
                <td class="data2" style="text-align: center; font-size: 12px;">
<iframe title="Air Quality Index7" height="320" src="https://widget.airnow.gov/aq-flag-widget/?city=Hartford&state=CT&country=USA&n=Newington,%20CT" style="background-color: white;" width="230"></iframe>               
                <br />
                </td>
            </tr>
        </table>
                </td>
            </tr>
<?php // end $showAQI - PLASE YOUR CODE INPLACE OF THIS SECTION AND END HERE  ?>

3. Copy your get-aqi-rss.php to get-aqi-rss.bak and then delete the get-aqi-rss.php file.

You are done. :)

Yeah this could be cleaned up a bit but took me about 1o minutes to figure out.   There are a number of other AQI widgets you can use instead, just replace the code with theiframe code with the new code they gave you.

The nice part about this is because its an iframe, the loading of that frame will not slow down the loading of the rest of the site. No more waiting 60 seconds for your site to load. :D


Scott - NewingtonWeather.COM - Newington, Connecticut's Weather Source!
Davis Vantage Pro 2 Plus - WeatherFlow Tempest for Lightning - Weather-Display Software

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Occasional Slow Load Times
« Reply #23 on: March 30, 2024, 04:57:10 PM »
Tracert to https://feeds.enviroflash.info/ takes me to 108.166.244.2 where it stops after about 8 hops, so the problem isn't local. 

Code: [Select]
tracert feeds.enviroflash.info

Tracing route to airnow-alb-166947887.us-east-2.elb.amazonaws.com [3.132.137.46]
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  unifi.chezdan [10.132.101.1]
  2     3 ms     4 ms     3 ms  lo0-100.PITBPA-VFTTP-314.verizon-gni.net [72.77.95.1]
  3     *        *        *     Request timed out.
  4     2 ms     3 ms     8 ms  0.ae2.GW1.PIT8.ALTER.NET [140.222.8.81]
  5     *        *        *     Request timed out.
  6    19 ms    18 ms    18 ms  108.166.252.47
  7     *        *        *     Request timed out.

Haven't tried to change my DNS to see it that's the problem to try to get another routing to AWS.  Unclear to me if its AWS or some intermediary.  But getting similar traces from different devices (Verizon vs TMobile as ISP).

So tracert/traceroute does a chained ICMP ping trace to each of the routers in sequence (3 times for each router in the series).
It's based on the IP address of the system running the tracert and not the IP address of your webserver, so is not really useful to diagnose webserver to webserver routing issues.

Also, ICMP/ping responses may be disabled on intermediate routers/systems, so having '* * *' for times is indeterminate to the issue.

Third, ICMP/ping is not TCP/IP which is used by the http/https connections so is not connecting to the daemon running the http/https service on the target address, it's just a daemon that runs on the OS part of the webserver.

So... beware of using tracert/traceroute from your home system -- it won't give results applicable to your webserver's routing connection to the target address (unless you run the tracert/traceroute via SSH on your webserver, but most shared hosts don't allow that).
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

 

anything