Reputation: 21
I admit that I'm not the brightest guy when it comes to API usage, but I'm learning. I'm quite adept at building Wordpress sites, and I'm currently building one for a friend that is linking his Youtube channel to his blog site. I'm using a plugin (one that is highly rated, mind you) and have set up a YouTube API key
.
For a few days as I was building the site, trying out different themes, etc. You can see in my quota chart that queries were very low, far from the million that is the limit. But then, on Thursday Sept 21, they skyrocketed and my limit was reached and exceeded, shutting down the API
until it reset at midnight. Then the next day, I didn't work on the site until the evening, and my query count topped over 650,000. I was the only person accessing the site, it is under construction and not available to the public yet.
I am linking to YouTube on two pages, the home page had a link to his YouTube live video (assuming he is live at the time of loading the page), and a page that lists all YouTube videos on his channel. I have noticed that if I go to the channel page, the query count goes up 5 units. If I load the home page with the live video (or a different video if he's not live), the query count goes up 102 units.
I rarely ever visit the channel page. I have been working on the Home page for a few days, making tweaks here and there. But in order to max out my quota at 102 unit per page load, I'd be refreshing the home page over 9000 times. Something just doesn't seem right.
Am I missing something? Anyone have any insight into how my quota can be maxed out or a majority of it used with only ONE person accessing the site?
Here's a screen shot of my quota page:
Thanks in advance. The site goes live on Thursday, I really would like to keep the page without errors when that happens.
Upvotes: 0
Views: 510
Reputation: 785
As it is a broad question, I will try to help. But note that it might be shooting in the dark.
On my own project that I did as a self project ( it is a youtube retro page site), on an average page load I have a quota of 14.
This is to a few api calls at the same time to populate the needed info.
So from my knowlage, I can assume a few things.
1: It is possible that someone has used/found your api key.
2: you are not using the correct calls for the task at hand.
3: Your script might have something that is running more times than expected.
4: Bad implementation of calls or scripts.
And lastly
5: I have seen it where search bots and page crawlers are indexing the pages and in doing so, use up quota.
These are not the only possible reasons, but from limited info, sound like a good start to look at.
Here is the page to look at QUOTA LIMITS
Upvotes: 1