That’s a safety feature for the webserver. It is controlled by FarmBot, Inc. to prevent denial of service attacks by malicious users. In the past, some power users tried some things that resulted in poor server performance for all other users. We’ve unfortunately had to add this protection for real-world, non-speculative reasons. If you see this when writing custom FarmBot software, it can be a sign you have chosen the wrong architecture. I can take a look at a code snippet if you have one, but it generally happens inside of loops (eg: trying to create a FarmBot instance 1,000 times inside a loop that has no pauses).
I can remove the rate limit from your account this one time. For future reference, the following actions will trigger a rate limit:
- Your device has some sort of problem (hardware, bad configuration, low network quality, etc…) that is causing it to send error rates beyond the allowed rate limit. I am happy to help you solve this problem if you think that’s the case. Since you mentioned you are using FBJS, this is less likely.
- Logging in too many times, even if you have a correct username/password. The reasons for this one are complicated, but you should try to keep your MQTT sessions stable.
- You have low WiFi quality, so the MQTT client continually re-connects to the server.
- You are sending too many
send_message commands (common).
- You are sending an abnormally high number of requests (like
read_status), usually inside of a loop or via recursion. Limits will be described below.
- You are hitting the
/sync HTTP endpoint too often.
The rules that will trigger a rate limit will vary, but generally speaking, they will trigger under the following circumstances:
- 60 MQTT messages per min
- 3600 MQTT messages per hour
- 86400 MQTT messages per day
If your device violates the “one minute” rule, it will be unthrottled on the next minute.
If it violates the “one hour” rule, it will be unthrottled at the top of the next hour, etc…
Please let me know if you need help identifying the source of the rate limiting.