Too many API Hits on indexer

Sonarr version (exact version): 2.0.0.5085
Mono version (if Sonarr is not running on Windows):
OS: Windows 10
Debug logs: https://www.dropbox.com/s/93wkkd7nav72zpq/Sonarr%20Log.txt?dl=0
(Make sure debug logging is enabled in settings and post the full log to hastebin/pastebin/dropbox/google drive or something similar, do not post them directly here)
Description of issue: Large amount of API hits showing on indexer

I’ve been using Sonarr for a while now in conjunction with NZB.su, but looking at changing indexers. In trying to determine which package to pay for (API limits) I looked at the API hits in my profile for today. It shows I have 1501 hits as of late this evening. I have 4 shows set up for Tuesdays. Sonarr is defaulted to 15 minute intervals. If I do my math correctly that should be 384 hits. Now there was a single holdover show from yesterday, but even then, that should be no more than 480 API hits.

I’ve been through all my shows and made sure there were no backlogs trying to download too, so I can’t begin to figure out how I have so many API hits. I checked my latest log for “Starting RSS Sync” and I only pull in 237 hits of that. I’m not sure if that’s the correct way to see how many requests Sonarr is putting out, but it seemed like a good start.

Can anyone help me to understand how i could possibly have so many API hits compared to what NZB.su shows as 1500 hits? The most I could…should…have is 480, I think, on Fridays when I have 5 shows to download.

RSS sync is one, getting an NZB another, automatic searches, manual searches, …

I will admit I do some searches each night, and might grab a few extra shows, but not to make up a difference of over 1000 API hits. Most nights are just Sonarr doing it’s thing and I’ll come along late at night and poke through categories or possibly search for a few shows, certainly no more than 10 in a given night. This shouldn’t ever be more than 500 API hits given that I would think.

The number of shows is irrelevant, since RSS feeds have items for all shows, even ones you’re not watching. If Sonarr has an RSS sync interval of 15 minutes, you’re using 96 API calls for RSS (24 * 60 / 15 = 96).

A search is going to use between 1 and 10 API calls, depending on the number of results returned Sonarr will fetch 100 results on each call and fetch up to 1000 results total.

With the debug logs you could track exactly how many API calls Sonarr is making and if you’re using nothing else that talks to their API you should be able to see parity in the numbers. Could be any number of things using their API.

If you think something else may be using it, reset the API key and only add it to Sonarr, if the numbers are still high, try turning off Sonarr and checking if the number of API calls is still increasing.

Unless you’re searching a lot Sonarr likely isn’t using 1500 hits a day, checking a couple indexers I’m seeing a little over 100 hits in the last 24 hours.

What would I be looking for in the debug log? I did turn debug on last night, but it’s created several files even just today every few hours in blocks. I can’t imagine what else I have that would be making API calls though.

I don’t know how to reset my API on nzb.su though. I thought it was just given to us as a unique key to access the site for queries.

Edit: I see lines like so. Would these be the API hits?

18-1-24 22:03:08.0|Debug|Api|[GET] /api/queue?sort_by=timeleft&order=asc: 200.OK (18 ms)
18-1-24 22:04:38.0|Debug|Api|[GET] /api/queue?sort_by=timeleft&order=asc: 200.OK (25 ms)
18-1-24 22:06:08.1|Debug|Api|[GET] /api/queue?sort_by=timeleft&order=asc: 200.OK (14 ms)
18-1-24 22:07:38.2|Debug|Api|[GET] /api/queue?sort_by=timeleft&order=asc: 200.OK (12 ms)
18-1-24 22:09:08.3|Debug|Api|[GET] /api/queue?sort_by=timeleft&order=asc: 200.OK (21 ms)
18-1-24 22:10:38.3|Debug|Api|[GET] /api/queue?sort_by=timeleft&order=asc: 200.OK (13 ms)
18-1-24 22:12:08.5|Debug|Api|[GET] /api/queue?sort_by=timeleft&order=asc: 200.OK (134 ms)
18-1-24 22:13:38.5|Debug|Api|[GET] /api/queue?sort_by=timeleft&order=asc: 200.OK (17 ms)
18-1-24 22:14:06.6|Debug|Api|[GET] /api/health: 200.OK (1 ms)
18-1-24 22:14:06.6|Debug|Api|[GET] /api/health: 200.OK (0 ms)
18-1-24 22:14:07.0|Debug|Api|[GET] /api/diskspace: 200.OK (354 ms)
18-1-24 22:14:07.2|Debug|Api|[GET] /api/diskspace: 200.OK (286 ms)
18-1-24 22:14:10.4|Debug|Api|[GET] /api/log/file: 200.OK (9 ms)
18-1-24 22:14:10.5|Debug|Api|[GET] /api/log/file/sonarr.debug.txt: 200.OK (1 ms)
18-1-24 22:14:13.1|Debug|Api|[GET] /api/log/file/sonarr.debug.txt: 200.OK (1 ms)

Edit your profile and hit the Generate button under the Site Api/Rss Key field.

No, those are queries to Sonarr’s API.

The requests to nzb.su with have the URL you entered in Sonarr’s settings for nzb.su.

Thanks, Markus!

According to one of the 2 hour logs I looked at using the indexer URL, there only 6 API Hits. There’s something definitely crazy going on there, because the site says I have 3 grabs, yet I haven’t downloaded anything at all today. I found the option to reset the API like you pointed out, so I’m going to reset it and see how it goes.

Looks like that got it. While trying to get my NZBGet extension to work, I’m thinking I left the port open just long enough for someone to hijack it

Resetting the API helped and now I only have about 183 hits.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.