Author Topic: Alt-dashboard long load time  (Read 796 times)

0 Members and 1 Guest are viewing this topic.

Offline JupiterJoe

  • Senior Contributor
  • ****
  • Posts: 195
  • JupiterWX.com
    • Live Jupiter, FL Weather
Alt-dashboard long load time
« on: May 24, 2020, 03:44:43 PM »
Hi guys. A few months ago or so, my alt-dashboard page has been taking a really long time to load. I’m not sure where to begin to find out what the hang up is. All of the other pages on the site load relatively quickly, just the home dashboard page is quite slow.
Any pointers?
https://www.joe4speed.com/wxindex.php

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Alt-dashboard long load time
« Reply #1 on: May 24, 2020, 05:01:03 PM »
Sure, first run check-fetch-times.php?show=versions to see if the scripts are up-to-date (they mostly are on your site).
Then run check-fetch-times.php itself to show timings to the usual websites.

Your results looks pretty normal except for the UV forecast fetch:
 curl fetching 'http://www.temis.nl/uvradiation/nrt/uvindex.php?lon=-80.097374&lat=26.967634'
 HTTP stats:  RC=200 dest=145.23.254.72 port=80 (from sce=173.236.184.135)
      Times: dns=2.511 conn=2.590 pxfer=2.591 get=1.070 total=3.661 secs

Then do a view-source of view-source:https://www.joe4speed.com/wxindex.php?debug=y&force=1 and look for all the 'HTTP stats' messages to see what the load times of the support scripts are showing.

The UV forecast again reports:
HTTP stats:  RC=200 dest=145.23.254.72 port=80 (from sce=173.236.184.135)
      Times: dns=2.511 conn=2.590 pxfer=2.590 get=0.917 total=3.507 secs

I do notice on the view-source, that there's a 404 for your Forecast Zone spec.  FLZ068 is not found.  You should use FLZ168 in your Settings.php
Code: [Select]
$SITE['NWSforecasts']   = array( // for the advforecast2.php V3.xx version script
// use "Zone|Location|Point-printableURL",  as entries .. first one will be the default forecast.
  "FLZ0168|Jupiter|http://forecast.weather.gov/MapClick.php?lat=26.967634&lon=-80.097374&unit=0&lg=english&FcstType=text&TextType=2",
"FLZ064|Hobe Sound|http://forecast.weather.gov/MapClick.php?lat=27.05950&lon=-80.13643230000002&unit=0&lg=english&FcstType=text&TextType=2",
);

Lastly, running the developer tools and watching the timing of the full page just shows a 28 second load.. the UV counts for maybe 3.5 seconds of that.

I'm suspecting that something inside the alternative dashboard might be causing the bulk of the delay .. look in the code for all the include()/include_once()/require()/require_once() statements.. one of them (that are not loading the usual top/header/common/menubar/footer/Settings files is your likely culprit.

Hope this helps...


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 saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Alt-dashboard long load time
« Reply #2 on: May 24, 2020, 05:06:59 PM »
Think I've found it.. the wxaqirss.php page is also loading very slowly, while the other pages are not.

Yep.. the wxaqirss.php page now shows
Quote
Warning: DOMDocument::load(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/robleh6/joe4speed.com/wxaqirss.php on line 214

Warning: DOMDocument::load(http://feeds.enviroflash.info/rss/forecast/163.xml): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/robleh6/joe4speed.com/wxaqirss.php on line 214
...

Your webserver's DNS lookup for enviroflash.info are failing (after multiple timeouts) and that's causing the delay.

In ajax-dashboard6.php, try turning off the aqi function to speed up the homepage.

Since http://feeds.enviroflash.info/rss/forecast/163.xml works fine for me, I suggest you also contact your webhoster tech support and ask them to fix DNS resolution for enviroflash.info .. they may need to restart one or more caching DNS servers providing name resolution to your website server.
« Last Edit: May 24, 2020, 05:09:56 PM by saratogaWX »
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 JupiterJoe

  • Senior Contributor
  • ****
  • Posts: 195
  • JupiterWX.com
    • Live Jupiter, FL Weather
Re: Alt-dashboard long load time
« Reply #3 on: May 24, 2020, 05:30:26 PM »
Thank you so much, Ken! I will check all of that out. What a great help you’ve been. I really appreciate your time and advice.

Offline JupiterJoe

  • Senior Contributor
  • ****
  • Posts: 195
  • JupiterWX.com
    • Live Jupiter, FL Weather
Re: Alt-dashboard long load time
« Reply #4 on: May 24, 2020, 06:49:35 PM »
Hmmm... it still does it even after I deleted and disabled the pages in question. I'll have to dig deeper.

Offline ConligWX

  • Forecaster
  • *****
  • Posts: 836
  • #conligwx
    • conligwx.org
Re: Alt-dashboard long load time
« Reply #5 on: May 24, 2020, 07:06:12 PM »
yep site is very slow from UK viewing.  a few wx scripts need updating when checking https://www.joe4speed.com/check-fetch-times.php?show=versions

though as ken says the issue seems likely on the dashboard as other pages load fine.
Regards Simon
Davis Vantage Pro2 Plus (6162UK) • Daytime FARS • WeatherLink Live • AirLink • PurpleAir PA-II-SD • CumulusMX •


Offline ConligWX

  • Forecaster
  • *****
  • Posts: 836
  • #conligwx
    • conligwx.org
Re: Alt-dashboard long load time
« Reply #6 on: May 24, 2020, 07:12:59 PM »
also your whois online page is showing errors

http://www.joe4speed.com/whos-online.php

this maybe a setting in settings.php too

Code: [Select]
// include the who's online functions
$C['files_path'] = '/home/www/whos-online/';              // full path, always end with a slash
$C['files_url'] = 'http://www.yoursite.com/whos-online/'; // url, always end with a slash
require ($C['files_path'].'include-whos-online-header.php');
  $whos_online_records = update_whos_online();


rem them out and see if that helps too.
Regards Simon
Davis Vantage Pro2 Plus (6162UK) • Daytime FARS • WeatherLink Live • AirLink • PurpleAir PA-II-SD • CumulusMX •


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Alt-dashboard long load time
« Reply #7 on: May 24, 2020, 08:16:29 PM »
Don't forget to comment-out
Code: [Select]
include_once('get-aqi-rss.php');   // get AQI index value for dashboard display
in ajax-dashboard6.php to turn off the AQI checking.  I think that's where the majority of the delay comes from.

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 JupiterJoe

  • Senior Contributor
  • ****
  • Posts: 195
  • JupiterWX.com
    • Live Jupiter, FL Weather
Re: Alt-dashboard long load time
« Reply #8 on: May 25, 2020, 10:30:40 AM »
Don't forget to comment-out
Code: [Select]
include_once('get-aqi-rss.php');   // get AQI index value for dashboard display
in ajax-dashboard6.php to turn off the AQI checking.  I think that's where the majority of the delay comes from.
That did it! Thank you so much! I really appreciate it. Yay!!!

Offline JupiterJoe

  • Senior Contributor
  • ****
  • Posts: 195
  • JupiterWX.com
    • Live Jupiter, FL Weather
Re: Alt-dashboard long load time
« Reply #9 on: May 25, 2020, 10:31:42 AM »
also your whois online page is showing errors

http://www.joe4speed.com/whos-online.php

this maybe a setting in settings.php too

Code: [Select]
// include the who's online functions
$C['files_path'] = '/home/www/whos-online/';              // full path, always end with a slash
$C['files_url'] = 'http://www.yoursite.com/whos-online/'; // url, always end with a slash
require ($C['files_path'].'include-whos-online-header.php');
  $whos_online_records = update_whos_online();


rem them out and see if that helps too.

Yeah, I might get rid of that since it hasn't worked in a while, and I'm not sure if a newer version is out to replace it. Thank you for your help!

Offline ConligWX

  • Forecaster
  • *****
  • Posts: 836
  • #conligwx
    • conligwx.org
Re: Alt-dashboard long load time
« Reply #10 on: May 30, 2020, 04:05:15 AM »

Yeah, I might get rid of that since it hasn't worked in a while, and I'm not sure if a newer version is out to replace it. Thank you for your help!

Yes I removed it a while back since the geo loookup datafiles are not updated any longer and that when installing something like zb-block, you realise, most of the visitor are bots who trawl your content for anything that can be used against you or use methods to try and hack your site.

Regards Simon
Davis Vantage Pro2 Plus (6162UK) • Daytime FARS • WeatherLink Live • AirLink • PurpleAir PA-II-SD • CumulusMX •


Offline tshattuck

  • Forecaster
  • *****
  • Posts: 337
    • Your Local Weather - Clay, NY
Re: Alt-dashboard long load time
« Reply #11 on: July 10, 2020, 07:30:53 PM »
Hello:
I have a similar problem that has been going on and off for the past 8 months. The problem is also affecting web page: wxforecast.php

I ran: http://www.yourlocalweather-clay-ny.com/check-fetch-times.php?=versions

--checking NWS Forecast URL --
Using first entry in Settings.php $SITE['NWSforecasts'] for test.
URL: https://api.weather.gov/points/43.1858,-76.1728/forecast
Cache: ./cache/forecast-NYZ018-test-json.txt
 curl fetching 'https://api.weather.gov/points/43.1858,-76.1728/forecast'
 note: fetched 'https://api.weather.gov/gridpoints/BGM/50,104/forecast' after redirect was followed.
 HTTP stats:  RC=200 dest=184.84.228.8 port=443 (from sce=65.60.10.114)
      Times: dns=0.000 conn=0.002 pxfer=0.024 get=0.008 total=0.033 secs
RC=200, bytes=13475
Data age=9234 sec 'Fri, 10 Jul 2020 20:43:09 GMT'
Wrote 13475 bytes to ./cache/forecast-NYZ018-test-json.txt successfully.
Test was SUCCESSFUL.
--end NWS Forecast URL check --


I ran this script several times and the total time has been as high as 6 seconds. Not sure what is going on, the times are all over the place, there is no consistency. This started occurring about 2 weeks after I switched from GoDaddy to FastComet (Nov, 2019). I checked with FastComet when this started occurring and they stated my web site was loading perfectly for them. Does anyone have any idea what is going on?

My ISP: Spectrum

Regards

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 947
    • LexMAWeather
Re: Alt-dashboard long load time
« Reply #12 on: July 10, 2020, 07:58:01 PM »
See this thread:

  https://www.wxforum.net/index.php?topic=39785.0

If you don't want to deal with the API flakiness right now, change your advforecast2.php script to V4.05.
https://lexmaweather.info
On Mastodon: @LexMAWeather@toot.community

Offline tshattuck

  • Forecaster
  • *****
  • Posts: 337
    • Your Local Weather - Clay, NY
Re: Alt-dashboard long load time
« Reply #13 on: July 11, 2020, 12:04:33 PM »
Jasiu:
I will seriously consider your recommendation. This has been very frustrating, even my users have commented on the slow response times. Not a good look!  :oops:

Thanks for the feedback.

Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 439
    • Penn Lake Weather
Re: Alt-dashboard long load time
« Reply #14 on: July 22, 2020, 08:50:36 PM »
Don't forget to comment-out
Code: [Select]
include_once('get-aqi-rss.php');   // get AQI index value for dashboard display
in ajax-dashboard6.php to turn off the AQI checking.  I think that's where the majority of the delay comes from.

Hi Ken, so far I too commented-out those line and my site at least the several times I checked tonight went from loading at about 8 seconds down to 2 or 3 secs.
So, any explanation of the problem, (mine or theirs) and will I ever be able to get the air quality report?