Anyone notice a problem with aeris weather API today?

147 views
Skip to first unread message

Dan Roman

unread,
Oct 6, 2023, 2:25:50 PM10/6/23
to weewx-user
Early this morning I received an error that there were too many requests and it has not cleared up all day.  Log is below with ID and key removed.

Wondering if the server was attached and received too many requests because I am only asking one per 5 minutes for the past year without problems and now it is an issue.  I disable the forecast for now but wondering what is happening.

Dan


Oct  5 05:00:20 pimatrix weewx[688] INFO weewx.manager: Added record 2023-10-05 05:00:00 EDT (1696496400) to database 'weewx.sdb'
Oct  5 05:00:20 pimatrix weewx[688] INFO weewx.manager: Added record 2023-10-05 05:00:00 EDT (1696496400) to daily summary in 'weewx.sdb'
Oct  5 05:00:25 pimatrix /weewxd: weatherflowudp: MainThread: Listening for UDP broadcasts to IP address <broadcast> on port 50222, with timeout 90 and share_socket True...
Oct  5 05:00:26 pimatrix weewx[688] INFO weewx.restx: PWSWeather: Published record 2023-10-05 05:00:00 EDT (1696496400)
Oct  5 05:00:29 pimatrix weewx[688] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 4.16 seconds
Oct  5 05:00:34 pimatrix weewx[688] INFO weewx.imagegenerator: Generated 28 images for report SeasonsReport in 4.49 seconds
Oct  5 05:00:34 pimatrix weewx[688] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx
Oct  5 05:00:34 pimatrix weewx[688] INFO weewx.cheetahgenerator: Generated 6 files for report SmartphoneReport in 0.15 seconds
Oct  5 05:00:36 pimatrix weewx[688] INFO weewx.imagegenerator: Generated 12 images for report SmartphoneReport in 1.74 seconds
Oct  5 05:00:36 pimatrix weewx[688] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx/smartphone
Oct  5 05:00:36 pimatrix weewx[688] INFO weewx.cheetahgenerator: Generated 1 files for report MobileReport in 0.06 seconds
Oct  5 05:00:36 pimatrix weewx[688] INFO weewx.imagegenerator: Generated 4 images for report MobileReport in 0.29 seconds
Oct  5 05:00:36 pimatrix weewx[688] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx/mobile
Oct  5 05:00:37 pimatrix weewx[688] ERROR weewx.reportengine: Caught unrecoverable exception in generator 'weewx.cheetahgenerator.CheetahGenerator'
Oct  5 05:00:37 pimatrix weewx[688] ERROR weewx.reportengine:         ****  Error downloading forecast data. Check the URL in your configuration and try again. You are trying to use URL: https://api.aerisapi.com/forecasts/40.84185,-74.53198?&format=json&filter=day&limit=7&client_id=pr3skoHUQ2jtPDj1WTNMc&client_secret=xMjQphHVAyB7xZyyTNmjIQauvdfQmJWjl8cfEf3D, and the error is: HTTP Error 429: Too Many Requests
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/user/belchertown.py", line 1273, in get_extension_list
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****      response = urlopen(req)
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.7/urllib/request.py", line 222, in urlopen
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****      return opener.open(url, data, timeout)
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.7/urllib/request.py", line 531, in open
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****      response = meth(req, response)
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****      'http', request, response, code, msg, hdrs)
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.7/urllib/request.py", line 569, in error
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****      return self._call_chain(*args)
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****      result = func(*args)
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****    File "/usr/lib/python3.7/urllib/request.py", line 649, in http_error_default
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****      raise HTTPError(req.full_url, code, msg, hdrs, fp)
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****  urllib.error.HTTPError: HTTP Error 429: Too Many Requests
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****  
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****  During handling of the above exception, another exception occurred:
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****  
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 197, in run
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****      obj.start()
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 385, in start
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****      self.run()
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 169, in run
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****      ngen = self.generate(gen_dict[section_name], section_name, self.gen_ts)
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 229, in generate
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****      ngen += self.generate(section[subsection], subsection, gen_ts)
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 229, in generate
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****      ngen += self.generate(section[subsection], subsection, gen_ts)
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 325, in generate
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****      _filename))
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 415, in _getSearchList
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****      search_list += obj.get_extension_list(timespan, db_lookup)
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/user/belchertown.py", line 1397, in get_extension_list
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****      % (forecast_24hr_url, error)
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****  Warning: Error downloading forecast data. Check the URL in your configuration and try again. You are trying to use URL: https://api.aerisapi.com/forecasts/40.84185,-74.53198?&format=json&filter=day&limit=7&client_id={id}&client_secret={key}, and the error is: HTTP Error 429: Too Many Requests
Oct  5 05:00:38 pimatrix weewx[688] ERROR weewx.reportengine:         ****  Generator terminated
Oct  5 05:00:38 pimatrix weewx[688] INFO weewx.reportengine: Copied 3 files to /var/www/html/weewx/trowbridgemtn

Dan Roman

unread,
Oct 6, 2023, 3:28:16 PM10/6/23
to weewx...@googlegroups.com
I should have noted that pasting the Aeris API URL into a browser returns this JSON:

{"success":false,"error":{"code":"maxhits_daily","description":"Maximum number of daily accesses reached."},"response":[]}



--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/cf86GoBzLmg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/0e7d9e3e-c32c-4bcc-8fa7-0e811676c5acn%40googlegroups.com.


--
Dan Roman
 

gjr80

unread,
Oct 6, 2023, 5:19:01 PM10/6/23
to weewx-user
I suspect that given this response the error is not with Aeris Weather, but rather you have exceeded one of the rate limits for the Aeris Weather API. If you are using the free contributor plan you have a limit of 1000 hits per day and 100 hits per minute (if you are on a paid plan you likely have higher limits).  I suspect you are most likely hitting the per day limit. I have no idea how Belchertown handles Aeris Weather API calls, but I can offer the following suggestions for tracking down the issue. 

Is this an ongoing problem or a one off? (if you have exceeded the daily hit limit you will need to wait for the next day before your limit resets). Is there anything earlier in the log (you need to look at all of the day concerned not just the last few minutes)? Do you have anything else that hits the Aeris Weather API (either within WeeWX, on your WeeWX machine or another machine)? If just WeeWX and it an ongoing issue find some log settings that cause Belchertown Aeris Weather API calls to be logged (perhaps debug = 1 or maybe 2, or there maybe a setting in the Belchertown config setting). Once you have the API calls being logged let WeeWX run and count up the calls, are you exceeding either limit? Remember you need to look across the whole day, not just a few minutes/hours.

Once you find where the limit is being exceeded then you or others can start looking at a solution.

Gary

Karen K

unread,
Oct 7, 2023, 2:57:54 AM10/7/23
to weewx-user
After successful download you find a logging entry like this:

Oct  7 08:00:42 XXX weewx[12345] INFO user.belchertown: New forecast file downloaded to /var/www/html/weewx/belchertown/json/forecast.json


So you may want to look into the log starting after midnight. This message should show up not more than once an hour.


Reply all
Reply to author
Forward
0 new messages