Author Topic: slow index page  (Read 476 times)

0 Members and 1 Guest are viewing this topic.

Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1597
    • Texas Weather
slow index page
« on: May 04, 2019, 11:12:29 PM »
After I moved to meteobridge I notice that my index page is taking for ever to load. It used to be snappy and fast...  now take almost amin to load the page....
Any ideas why?

https://www.txweather.org

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095
Donations are welcome: https://paypal.me/ffuentesb

Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1597
    • Texas Weather
Re: slow index page
« Reply #1 on: May 04, 2019, 11:21:57 PM »
Looks like is my ajax dashboard but cant seem to see why... It was fine before... :(

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095
Donations are welcome: https://paypal.me/ffuentesb

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 947
    • LexMAWeather
Re: slow index page
« Reply #2 on: May 04, 2019, 11:31:42 PM »
Always a good idea to do a view-source when this happens.

  view-source:https://www.txweather.org/

Notice this:

Code: [Select]
<!-- get-USNO-sunmoon.php - Version 3.02 - 23-Nov-2018 -->
<!-- refetch seconds=1 -->
<!-- loading ./cache/USNO-moondata.txt from https://api.usno.navy.mil/rstt/oneday?date=05/04/2019&coords=30.05374,-95.49454&tz=-5 -->
<!-- curl fetching 'https://api.usno.navy.mil/rstt/oneday?date=05/04/2019&coords=30.05374,-95.49454&tz=-5' -->
<!-- curl Error: Could not resolve host: api.usno.navy.mil -->
<!-- HTTP stats:  RC=0 dest= port=0 (from sce=)
      Times: dns=0.000 conn=0.000 pxfer=0.000 get=27.536 total=27.536 secs -->
<!-- headers returned:

 -->
<!-- Error loading from USNO API, cache not saved -->
<!-- loading finished. -->
<!-- processing JSON entries for Moon data -->
<!-- json_decode returns  - Syntax error, malformed JSON -->
<!-- note: 'fracillum' not in JSON, no 'illumination' is available. -->
<!-- USNOdata
Array
(
    [databy] => USNO
)
 -->

As you can see, that's chewing up over 27 seconds. And it's not anything you did - it's a coincidence that the DNS resolution started failing at this time (I see it too, but I do the fetch in a cron job so my home page load isn't dependent upon it succeeding).

If you want to change code to shorten up the timeout, the code is in get-USNO-sunmoon.php within the function get_sunmoon_fetchUrlWithoutHanging(). The variable is $numberOfSeconds (defaults to 30).

This is a reoccurring problem with USNO but it's been a while since it has happened.
https://lexmaweather.info
On Mastodon: @LexMAWeather@toot.community

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 947
    • LexMAWeather
Re: slow index page
« Reply #3 on: May 05, 2019, 08:32:10 AM »
USNO is behaving itself now and your home page load is much snappier.
https://lexmaweather.info
On Mastodon: @LexMAWeather@toot.community

Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1597
    • Texas Weather
Re: slow index page
« Reply #4 on: May 05, 2019, 07:21:00 PM »
@jasiu Thank you for the tip, I know now what too look for in the future.

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095
Donations are welcome: https://paypal.me/ffuentesb

 

anything