GitHub user dosubot[bot] added a comment to the discussion: 
flask_limiter.errors.RateLimitExceeded: 429 Too Many Requests: 50 per 1 second

<!-- Answer -->
The default rate limit in Superset 5.0.0 is 50 requests per second for the 
application and 5 per second for authentication endpoints. These are set in the 
config file as `RATELIMIT_APPLICATION = "50 per second"` and `AUTH_RATE_LIMIT = 
"5 per second"`, and are enabled by default in production environments. You can 
adjust these limits by creating or editing a `superset_config.py` file and 
setting higher values for these variables if your workload requires it. See the 
[config.py 
source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/config.py)
 for details.

When a user accesses a dashboard, Superset makes separate API requests for each 
chart on the dashboard, plus additional requests for dashboard metadata and 
datasets. For example, a dashboard with 10 charts will typically generate at 
least 10 chart data requests, plus a few more for dashboard and dataset info. 
The actual number can be higher if there are filters or interactive elements, 
and each user session will trigger its own set of requests. For dashboards with 
many charts or high concurrency, the number of requests can quickly exceed the 
default rate limit, especially during load testing or with multiple users [see 
discussion](https://github.com/apache/superset/discussions/33944#discussioncomment-13592964).

To fix the 429 error, increase the `RATELIMIT_APPLICATION` value in your 
`superset_config.py` to match your expected peak request rate during load 
testing. For a medium-sized workload (for example, 10–50 concurrent users and 
dashboards with 5–20 charts), you may need to set the limit to several hundred 
requests per second, depending on your actual usage patterns and dashboard 
complexity. Monitor your logs to fine-tune this value and ensure your 
infrastructure can handle the increased load.

If you need distributed rate limiting (across multiple Superset instances), 
configure `RATELIMIT_STORAGE_URI` to use a backend like Redis. For more 
advanced options, refer to the [Flask-Limiter 
documentation](https://flask-limiter.readthedocs.io/en/stable/configuration.html).


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/21e6ace3-34b5-4697-bfc6-61e2e7e6e51f?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/21e6ace3-34b5-4697-bfc6-61e2e7e6e51f?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/21e6ace3-34b5-4697-bfc6-61e2e7e6e51f?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/21e6ace3-34b5-4697-bfc6-61e2e7e6e51f?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/21e6ace3-34b5-4697-bfc6-61e2e7e6e51f?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/21e6ace3-34b5-4697-bfc6-61e2e7e6e51f?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/21e6ace3-34b5-4697-bfc6-61e2e7e6e51f?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat
 with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
 nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/35625)

GitHub link: 
https://github.com/apache/superset/discussions/35646#discussioncomment-14678649

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to