Hello!
We are getting several 429 - Too many requests errors when calling Statistical API but we are not sure what the problem is.
Just to be sure, we tested this in isolation where no one else was using Sentinel APIs. We tested this from 2021/11/19-10:30:00 CET to 2021/11/19-11:00:00 CET.
We will be uploading logs which contain mainly headers information. Our test were:
- Field with 5 POIs => 6 requests to Stats API => No issues
- Field with 5 POIs => 6 requests to Stats API => No issues
- Waited a minute or more to max the usage again
- Field with 34 POIs => 34 requests to Stats API => 4 had a 429 error (PT1M violated policy)
- Field with 34 POIs => 34 requests to Stats API => 4 had a 429 error (PT1M violated policy)
We’ll be uploading a screenshot of our usage where it says we only consumed 35 PUs, hence even if we would have made all the calls together we should have never had 429 errors right?
What also caught our attention is that the header x-processingunits-spent
says that we are consuming 0.5 PUs per request, but if we compute the difference between requests, the PUs remaining seems to be dropping 10PUs at a request. Why is that?
Just in case, we also checked our largest POI in the request builder and the x-processingunits-spent
is effectively 0.5. So if we are consuming 0.5 per request, which is also what the usage dashboard says, how are we reaching the rate limit?
Dashboard: 35 PUs - 78 Requests (attached screenshot)
We already talked with support and the idea is to continue the discussion over this topic. But we are still unsure how are we reaching the rate limits, how the PUs are dropping by 10 at a request or if we are missing something else?
Thanks in advance!
Screenshot and logs:
{
headers: {
'x-ratelimit-remaining': '298.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '252.49999998509884',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '299.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '261.9999999701977',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '298.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '272.4999999552965',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '297.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '281.99999994039536',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '295.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '291.4999999254942',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '296.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '301.99999991059303',
'x-processingunits-retry-after': '0'
},
}
-------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------
{
headers: {
'x-ratelimit-remaining': '294.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '251.49999998509884',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '298.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '270.4999999552965',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '295.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '260.9999999701977',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '296.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '279.99999994039536',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '297.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '304.4999999254942',
'x-processingunits-retry-after': '0'
},
}
-------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------
11/19/2021, 10:36:54 AM Error: Request failed with status code 429 +3345ms
11/19/2021, 10:36:54 AM Error: Request failed with status code 429 +26ms
11/19/2021, 10:36:54 AM Error: Request failed with status code 429 +1ms
11/19/2021, 10:36:54 AM Error: Request failed with status code 429 +4ms
{
headers: {
'x-ratelimit-remaining': '297.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '33.49999998509884',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '298.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '42.99999997019768',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '294.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '52.499999955296516',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '299.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '61.999999940395355',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '296.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '72.4999999254942',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '292.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '93.49999989569187',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '291.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '83.99999991059303',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '295.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '102.99999988079071',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '289.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '114.49999986588955',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '293.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '123.99999985098839',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '290.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '135.49999983608723',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '285.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '146.99999982118607',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '288.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '157.4999998062849',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '287.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '166.99999979138374',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '277.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '176.49999977648258',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '286.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '185.99999976158142',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '273.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '196.49999974668026',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '283.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '205.9999997317791',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '274.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '216.49999971687794',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '291.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '225.99999970197678',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '282.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '236.49999968707561',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '281.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '245.99999967217445',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '284.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '255.4999996572733',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '282.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '266.99999964237213',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '275.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '276.49999962747097',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '279.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '286.9999996125698',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '280.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '296.49999959766865',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '278.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '309.49999998509884',
'x-processingunits-retry-after': '0'
},
}
{
headers: {
'x-ratelimit-remaining': '276.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '318.9999999701977',
'x-processingunits-retry-after': '0'
},
}
-------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------
11/19/2021, 10:55:46 AM Error: Request failed with status code 429 +4148ms
{
status: 429,
headers: {
'x-ratelimit-remaining': '271.0',
'retry-after': '0',
'x-processingunits-spent': '10.0',
'x-processingunits-remaining': '2.0',
'x-processingunits-retry-after': '1535'
}
}
11/19/2021, 10:55:46 AM Error: Request failed with status code 429 +8ms
{
status: 429,
headers: {
'x-ratelimit-remaining': '269.0',
'retry-after': '0',
'x-processingunits-spent': '10.0',
'x-processingunits-remaining': '2.0',
'x-processingunits-retry-after': '1534'
}
}
11/19/2021, 10:55:46 AM Error: Request failed with status code 429 +2ms
{
status: 429,
headers: {
'x-ratelimit-remaining': '270.0',
'retry-after': '0',
'x-processingunits-spent': '10.0',
'x-processingunits-remaining': '2.0',
'x-processingunits-retry-after': '1535'
}
}
11/19/2021, 10:55:46 AM Error: Request failed with status code 429 +179ms
{
status: 429,
headers: {
'x-ratelimit-remaining': '269.0',
'retry-after': '0',
'x-processingunits-spent': '10.0',
'x-processingunits-remaining': '3.0',
'x-processingunits-retry-after': '1400'
}
}
{
headers: {
'x-ratelimit-remaining': '298.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '26.49999998509884',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '299.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '35.99999997019768',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '297.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '46.499999955296516',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '296.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '57.999999940395355',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '295.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '67.4999999254942',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '288.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '76.99999991059303',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '287.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '88.49999989569187',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '290.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '99.99999988079071',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '294.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '110.49999986588955',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '292.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '119.99999985098839',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '293.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '131.49999983608723',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '287.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '141.99999982118607',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '291.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '151.4999998062849',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '289.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '162.99999979138374',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '286.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '173.49999977648258',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '285.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '183.99999976158142',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '279.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '193.49999974668026',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '283.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '204.9999997317791',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '281.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '214.49999971687794',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '282.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '224.99999970197678',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '278.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '236.49999968707561',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '280.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '246.99999967217445',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '284.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '256.4999996572733',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '274.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '265.99999964237213',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '278.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '277.49999962747097',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '273.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '287.9999996125698',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '276.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '297.49999959766865',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '277.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '306.9999995827675',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '272.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '309.49999998509884',
'x-processingunits-retry-after': '0'
}
}
{
headers: {
'x-ratelimit-remaining': '275.0',
'retry-after': '0',
'x-processingunits-spent': '0.5000000149011612',
'x-processingunits-remaining': '309.49999998509884',
'x-processingunits-retry-after': '0'
}
}