429

状態符号 429 (HTTP)

[2] 429 (Too Many Requests) は、要求数の上限 (rate limit) に達したことを表します。

仕様書

意味

[9] 429 は、 利用者がある時間内に送信した要求が多すぎることを示します >>1

[13] 利用者の特定や要求の数の数え方は、仕様では規定されていません >>1応用依存の方法で計測・制限できます。

[16] 429 を使うのは義務ではありませんから、 単にHTTP接続を閉じたりしても構いません >>15

構文

[10] 応答表現は、条件の詳細を含めるべきです >>1

[12] 例えば HTML英語で記述できます >>1

[11] 応答には Retry-After: ヘッダーを含めることができます >>1

処理

[14] キャッシュ可能ではありません >>1

文脈

[18] Web API サーバーで、 API の利用頻度制限に達した時に処理を拒むことを示すために使われることがあります。

[19] 契約や設計に基づく上限ではなく、意図しないサーバー側の資源不足によって処理できない状況にあるときは、 503 を使うのがより適切と思われます。

関連

[8] X-Rate-Limit-*: ヘッダーとよく併用されます。

歴史

[3] Platform API Reference | Heroku Dev Center ( 版) https://devcenter.heroku.com/articles/platform-api-reference#error-response

HTTP/1.1 429 Too Many Requests

{

"id": "rate_limit",

"message": "Your account reached the API rate limit\nPlease wait a few minutes before making new requests",

"url": "https://devcenter.heroku.com/articles/platform-api-reference#rate-limits"

}

[4] Dropbox - Core API - endpoint reference ( 版) https://www.dropbox.com/developers/core/docs

429 Your app is making too many requests and is being rate limited. 429s can trigger on a per-app or per-user basis.

[5] HTTP API - Guide - SoundCloud Developers ( 版) https://developers.soundcloud.com/docs/api/guide#errors

429 Too Many Requests To keep the amount of spam on SoundCloud as low as possible, our API limits the rate at which you can perform certain actions.

[6] Gnip Support ( 版) http://support.gnip.com/apis/powertrack/api_reference.html

429 Rate Limited Your app has exceeded the limit on connection requests.

[7] Uber API Reference Guide ( 版) https://developer.uber.com/v1/api-reference/

429 Too Many Requests. Rate limited.

[17] IIJmioクーポンスイッチAPI | クーポンについて | IIJmio ( 版) https://www.iijmio.jp/hdd/coupon/mioponapi.jsp

429 Your application sends too many requests X-IIJmio-Developer ヘッダに指定されたデベロッパIDを持つアプリケーション全体からのリクエスト数が上限を超過した

429 You send too many requests X-IIJmio-Authorization ヘッダに指定されたユーザからのリクエスト数が上限を超過した

[21] HTTP 429: Too Many Concurrent Connections · Bonsai () https://docs.bonsai.io/docs/troubleshooting-http-error-codes

[22] python3 - HTTP Error 429: Too Many Requests - youtube-dl stopped working - Ask Ubuntu () https://askubuntu.com/questions/1181500/http-error-429-too-many-requests-youtube-dl-stopped-working

For me the problem solved when I upgraded to kernel 4.14.150 ...

(both 4.14.148 and 4.14.149 had the same problem)

[23] >>22youtube-dl での報告ですが、 それだけの問題ではなくて、 curl --dump-header - https://www.youtube.com/watch でも再現するようです。 curl --dump-header - https://www.youtube.com/ では発生しません (200)。 そして同じ LAN に接続された別の環境で同時に実行したらそちらは 200。 なのでネットワークの問題や、サーバー側の規制ではないということです。 駄目な環境だと、 Python でも curl (HTTP/2) でも、他の言語で socket を読み書きするプログラムを書いても (HTTP/1.1) 再現します。 駄目な環境といっても、つい先日まで普通に動いていた環境でした。

こうなると TCPTLS のレベルで問題があると考えざるを得ません。 Google のサーバーなら変なことをしている可能性は十分あり得ます。 システムの OpenSSL と別にコンパイルした LibreSSL を使っても同じだったので、 TLS でなく TCP かもしれません。 Linux カーネル依存という報告とも整合します。 長時間使い続けるとか、 TCP セッション数が一定数を超えるとかで、 相性問題が起こるのかもしれません。

[25] TCP fingerprintingIPアドレス以外の要素も使って規制しているのかも?