Skip to content

API Throttling Being Tripped Causing IP To Be Banned For Hours #15

@ghost

Description

I noticed the cache was not being updated so I checked the files to see the question ids file was empty. Ran the script via CLI and got the following error.

Warning: file_get_contents(): HTTP request failed! HTTP/1.1 400 Bad Request
 in /usr/local/www/sites/cv-pls.com/dev/application/classes/Backlog.php on line 90

Warning: file_get_contents(compress.zlib://https://api.stackexchange.com/2.1/search/advanced?filter=%21wQ0g-ul-W8LDT0w&key=pMxerkFG8E257Xblt5BUHA%28%28&order=desc&pagesize=100&site=stackoverflow&sort=creation&tagged=php&page=1): failed to open stream: operation failed in /usr/local/www/sites/cv-pls.com/dev/application/classes/Backlog.php on line 90

What is weird is accessing the API request path directly shows the API data. I ran the script a few times and then it correctly got the data. Nothing changed between it working and not working.

Anyone have an idea what could be happening? I don't think it is the API key since the requests are small and spread out and fall well within the throttling limit, unless it's an API bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions