I get the below error quite a few times.
{"errors":["You’ve performed this action too many times. Please wait a few seconds before trying again."],"error_type":"rate_limit","extras":{"wait_seconds":0}}
How do I eliminate this error. Please suggest.
I get the below error quite a few times.
{"errors":["You’ve performed this action too many times. Please wait a few seconds before trying again."],"error_type":"rate_limit","extras":{"wait_seconds":0}}
How do I eliminate this error. Please suggest.
Go look in settings > Rate Limit. Change the values as you please
Hi @IAmGav,
I have made,
But, still the error is persistent. Are there any other limits I need to look at.
I have disabled all the settings mentioned in:
But, still I get the “You Have Performed this Action Too Many Times” error.
Is there something else I have to do?
So what are you exactly doing what causes this error?
I am trying to create Topics using API. While trying to create like 100 topics through API, it is throwing me this error.
I am also trying to Update Tags to my Topics through API, there are 100s of Topics in my forum which do not have tags. So I am updating tags to them through API.
So what are the values of
DISCOURSE_MAX_USER_API_REQS_PER_MINUTE
DISCOURSE_MAX_USER_API_REQS_PER_DAY
DISCOURSE_MAX_ADMIN_API_REQS_PER_KEY_PER_MINUTE
and are you sure you’re staying below those numbers?
你好 ![]()
我遇到了同样的问题,但这是关于读取操作的。
我正在构建一个与 Discourse 的集成,并使用 API 读取大量帖子。我没有进行任何写入操作,只是读取。为了获取最新的帖子,我执行以下操作:
/latest.json 端点获取最新的主题。/t/:id,这样我就可以获得帖子的流并进行分页。我还会在队列中执行所有请求,并尝试在 10 秒内发送不超过约 25 个请求,但仍然经常看到主题或帖子读取请求出现“您执行此操作的次数过多”错误。我查看了 Discourse 设置,但找不到任何读取限制。我只能看到“创建主题”和其他写入操作的限制。
我能对此做些什么吗?感谢您的任何建议,并为再次提起这个旧话题道歉。
看起来我达到了 max_admin_api_reqs_per_minute 的限制。可以自定义吗?在“设置”>“速率限制”中看不到。
编辑:实际上,似乎有两个限制生效。admin_api_key_rate_limit 和 ip_10_secs_limit
我想知道添加 ?print=true 是否有助于减少读取时的 API 调用次数?
这将允许您在一次 API 调用中获取 1000 篇帖子。
哦,出于某些原因,我以为 ?print 的速率限制更严格\n\n
?print=true 的使用无关,而是其他原因。我一定会试试。\n\n但据我所知,这只对超过 20 个帖子的主题有帮助。我相信我们的大多数主题帖子都少于这个数量,所以真正的瓶颈是过多的主题请求。
是的,那是用于限制用户。如果你有管理员 api 密钥,该设置不会影响你。
啊,是的,很有可能。
除了检查 429 错误并根据指定数量减慢速度之外,还有一些其他选项。
我建议先使用数据浏览器插件编写一个查询,以获取你想要的所有主题。我相信它最多可以返回 1000 个结果。然后,你可以使用 api 调用该查询并获取响应。
根据你的用例,webhooks 也可能很有帮助。你可以为每个新主题和帖子设置它们,然后只收听所有最新内容。
如果你仍然认为需要提高 api 速率限制,我们可以做到,但这仅限于我们的企业版套餐,因为它们不在我们的共享 pro/business 托管上。
使用数据探索器插件的问题在于,我们并不是 Discourse 集成的唯一用户。我们(fibery.io)允许我们的客户集成他们的 discourse 实例,以便他们能够无缝地将数据同步到我们的工具。
Webhooks 是一个不错的补充,但它们在首次同步(这是最繁重的工作,例如上个月的主题和帖子)时没有帮助。之后,我们会为新数据安排同步,这不成问题。
检查 429 并重试可以正常工作,只是有时会很慢)
感谢您的关注 ![]()