Announcement

Collapse
No announcement yet.

Ambient: The remote server returned an error: (429) Too Many Requests.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Ambient: The remote server returned an error: (429) Too Many Requests.


    Originally posted by cowinger View Post
    I am getting this warning in the log. The length of the API key is way longer than what I put in and there appears to be more than one. Both an api and an application key. The xxxx are from me for safety.

    Code:
    6/24/2021 3:37:40 PM 
    AK Weather 
    Warning 
    [4522] Ambient: ExecuteAsync (UserDevices) [/v1/devices?apiKey=xxxx426925af46d89072e456da819cbb71cb5a5399054 6f693df5022d130xxxx&applicationKey=41c604db848b4fe2916dfea4a 16b05b992c649ab7dd84b33802beda8db53893b]: The remote server returned an error: (429) Too Many Requests. [response = {"error":"above-user-rate-limit"}] [Status = ProtocolError] 
    AW limit API request rate:

    Each application is limited to 3 requests per second. That is shared between all the users of a particular app

    An individual user is limited to 1 request per second.

    The “lockout time” is just until the next second, so will have minimal impact on operation.
    Problem is - the App key is shared between all users, that's why you are getting this.

    So there are two options:

    1. Force each user generate his own app key, which may be a pain for the user.
    2. Ignore the 429 response and retry after 1 second.

    I guess I will implement both - implement retry and expose the App key, so users have a choice

    #2
    Ver 4.0.0.64 - configurable AppKey and retries (err 429)

    In case of the error it should retry 3 times with 1 sec delay (still log the warning). If this doesn't help - you can also generate your own Application Key https://ambientweather.net/account

    Comment


      #3
      Originally posted by alexbk66 View Post
      Ver 4.0.0.64 - configurable AppKey and retries (err 429)

      In case of the error it should retry 3 times with 1 sec delay (still log the warning). If this doesn't help - you can also generate your own Application Key https://ambientweather.net/account
      I did go into the website and I made a new key and entered it in. Thanks

      EDIT: No more warnings in log. All good.

      Comment


        #4
        Great

        Comment

        Working...
        X