Hi,
Our API requests are failing. I logged in and looked at the stats to see if there was a reason, but nothing appears different on my profile page or API pages. I do see a spike of 5000 requests per day and then it drops off.
The spike in requests are not at all my intended usage of the API service, and I am investigating the cause. I'll be implementing an API daily limit control in my code to prevent such future spikes. The spike appears to be related to a code changes that I rolled out a few days ago.
I'm assuming that my API key has been disabled? if so, can I have it turned back on.
Thanks,
Non riesci a trovare un film o una serie Tv? Accedi per crearlo.
Vuoi valutare o aggiungere quest'elemento a una lista?
Non sei un membro?
Risposta da Travis Bell
il 27 maggio, 2014 alle 11:02AM
Hi thinkingmedia,
If you're key is disabled, we would be returning a status code 10. I am pretty sure it's not, we have only disabled a handful of keys in 6 years.
What's an example request that is failing? We do have rate limiting in place which is outlined in the docs. Is it possible you're hitting the rate limit?
Risposta da Mathew Foscarini
il 27 maggio, 2014 alle 12:04PM
I only see the documents mention a limit of 10 requests per second, but I have our API service running with a fixed limit of 1 request every 2 seconds. With a retry interval of 30 seconds. It's suppose to check "now_playing" lists, and if it hasn't changed it will increase the delay for a recheck. It's suppose to only call the API a few times a day, and download new movies as they appear in the lists.
I think when it started failing it didn't record the failure as critical so it kept retrying every 30 seconds which caused the spike in requests. Unfortunately I don't log the response code for the failure (it's handled higher up in the code).
I'm happy to hear we haven't been disabled. I suspect that either I introduced a bug or maybe the API has changed. I'll look into it here and see what's going on. Thanks for the quick reply.
Risposta da Mathew Foscarini
il 27 maggio, 2014 alle 12:12PM
oh wow, this is embarrassing. The production server didn't have the API key configured. Everything is working now. I'll will implement improvements on monitoring the API service. I apologize for the false alarm. I am the only developer working on this project and it is overwhelming me as to how many things need my attention. With both back-end and front-end issues that constantly need work. I hope some day this is all worth it.
Risposta da Travis Bell
il 27 maggio, 2014 alle 3:19PM
Heh, no worries! Happens to all of us.
Cheers.