nucosen / broadcast

「同人音楽のトレンドをほぼ最速でキャッチできる生放送」NUCOSenで使用されている、自動放送システムのソースコードです。
GNU Affero General Public License v3.0
2 stars 2 forks source link

restdb.ioによるアクセス回数制限に引っかかった。汎用的なDBに対応したほうが良いのかもしれない #110

Open komatti365 opened 11 months ago

komatti365 commented 11 months ago

正式稼働のNucosenでrestdb.ioのアクセス回数制限に引っかかる 月額料金が非常に高額なので、ローカルホストのDBで動かせるようにできないだろうか。 エラーメッセージ ''' 429 Client Error: Too Many Requests for url: https://nico247-4804.restdb.io/rest/queue?q=%7B%7D&h=%7B"$orderby":%20%7B"priority":%201,"_id":-1%7D%7D, retrying in 1 seconds... [14:49] WARNING @ nucosen.db.dequeue (retry_internal) 429 Client Error: Too Many Requests for url: https://nico247-4804.restdb.io/rest/queue?q=%7B%7D&h=%7B"$orderby":%20%7B"priority":%201,"_id":-1%7D%7D, retrying in 2 seconds... [14:49] WARNING @ nucosen.db.dequeue (retry_internal) 429 Client Error: Too Many Requests for url: https://nico247-4804.restdb.io/rest/queue?q=%7B%7D&h=%7B"$orderby":%20%7B"priority":%201,"_id":-1%7D%7D, retrying in 4 seconds... '''

komatti365 commented 11 months ago

{"msg":"API - too many requests in time window for free plan. Try again in 7:51:19 hrs:min:sec. Please upgrade to paid plan to avoid this message. :)"} このメッセージから考えるに、当時より制限が厳しくなった?

komatti365 commented 11 months ago

https://github.com/parse-community/parse-server このあたりとかで代用できないだろうか

komatti365 commented 11 months ago

別のdbを指定すると再起動したことを確認 ただし、再び同様の制限に突っかかる可能性があることを考えると、やはり汎用的、且つセルフホストで安定的に稼働できるDBに乗り換えたほうがいいと考えます。 一応プランの制限はここに https://restdb.io/pricing/ image

komatti365 commented 11 months ago

もしかしたら、二つのnucosenを同じDBで動かしていたからレートリミットにかかった可能性もあるかも。 1日に1600件も動画紹介するのは現実的ではないですし。