I am trying to use the Discourse API to give silly responses in a forum. For example, if someone says “Linux” in a thread Discobot will respond “Do you mean GNU/Linux?”
It works, unless someone responds with the same phrase, then I get a bunch of 429 or empty responses for two minutes (it’s almost exactly two minutes), at which point the API will start handling responses normally again.
For example:
Linux
FOSS
dotnet
Java
Linux
This will function correctly. However:
Linux
FOSS
dotnet
Linux
Linux
This will break.
Any idea what the two minute window is pertaining to? We’ve played with the app.yml settings and adjusted API rate limits. It did not seem to have any effect.
That means that you are being rate limited. If you want to keep track of new posts, pooling like that is very inefficient. Can I suggest using webhooks ? That way you can react to new posts, instead of pooling even when nothing is happening.
Do you know how to disable the response rate-limits? I believe we’ve changed a few in the app.yml already, anything that pertained to API from this link:
Is this something specific in Nginx we need to explore?
There is a nginx template that is added by default. It’s will be one of the very first lines of the app.yml. You may want to remove the one about rate limits and rebuild for it to take effect.