High values returned for X-Cost-Rate-Limit-Reset even though api is available for calls


#1

Hello,

When using the advertising API to make analytic calls we are retrieving the cost headers to ensure that we are not making calls when their is no ‘api spend’ available.

Occasionally the values we are getting for X-Cost-Rate-Limit-Reset indicate that the API will be reset in 8 hours (value varies, has been up to 24 hours) rather than within a minute as normally happens. This is generally accompanied with a 503 error. However when we make the same call 10 minutes later we get the data as desired so did not need to wait the length of time indicated

Could you confirm whether we can ignore cases where X-Cost-Rate-Limit-Reset returns a much longer period than the expected 1 minute window.

Thanks


#2

Hello,

Thanks for reporting this issue, do you have any logs saved that you could post which show an abnormal response? Feel free to sanitize anything you post but if we have some details it’s usually possible to find the exact call you made in our own log system (to catch the 503). It would help speed up an investigation and confirm if there is a bug there.

Thanks,

John


#3

Hello,

We don’t have any logs but do have details of an instance where this happened.
Please see screen grab attached. The error happened on 4th of November 2015 at 4:44pm UK time.
Could you advise whether this is sufficient for you to be able to check your system. If required we can try and replicate the issue and store info to our logs.

Thanks


#4

Hi,

Unfortunately I don’t think I can find log information based upon this one, if you do see it happen again please let us know (something like the line item ID or promo tweet ID would be easiest to look up).

Thanks,
John


#5

Hi John,

We’re trying to replicate it so will update you with proper logs if we are able to.

Could you confirm whether we should even be seeing a value as high as 28842000 as the millisecond wait time when making analytics calls? I ask as that would mean we have to do some additional development to store this wait time and to ensure that no other calls are made until then as the twitter documentation mentions that making calls when not allowed can cause your account to be locked.

Many thanks


#6

Hello,

Please could you advise on the last comment.

Thanks,

“Could you confirm whether we should even be seeing a value as high as 28842000 as the millisecond wait time when making analytics calls? I ask as that would mean we have to do some additional development to store this wait time and to ensure that no other calls are made until then as the twitter documentation mentions that making calls when not allowed can cause your account to be locked.”