sandra.mccollum is experiencing intermittent errors when enabling the Right Sidebar Blocks component, despite having sufficient memory and disk space. The errors include a “sad face” emoticon and a connection issue message. toanvoc reports having the same error.
thoka suggests checking the browser console for errors, which reveals a rate limit issue (“429 Too Many Requests”) when Right Sidebar Blocks are enabled. sandra.mccollum investigates further and finds deprecation warnings and rate limit errors in the console.
sandra.mccollum questions why the DISCOURSE_SKIP_PER_IP_RATE_LIMIT_TRUST_LEVEL setting is not bypassing the rate limit for their admin account (trust level 4). thoka suggests that the rate limit might be caused by the number of requests made when Right Sidebar Blocks are enabled.
sandra.mccollum attempts to adjust the rate limit settings in the app.yml file, but the issue persists. thoka suggests that the rate limiting might be applied in two stages: first by nginx and then by the Rails app.
sandra.mccollum tries commenting out the web.ratelimited.template.yml line and adjusting the settings, but still encounters the “429 Too Many Requests” error. thoka recommends excluding their IP from rate limiting or skipping rate limiting completely for testing purposes.
I am getting some errors, have you seen these and know any solution? I thtought it was a windows memory issue, but it till happens if I have 6GB free in Windows.
2 deprecation-identify-source.js:15 DEPRECATION: Components with separately resolved templates are deprecated. Migrate to either co-located js/ts + hbs files or to gjs/gts. Tried to lookup ‘template:components/top-contributors’. [deprecation id: component-template-resolving] This will be removed in ember-source 6.0.0. See https://deprecations.emberjs.com/id/component-template-resolving
post.js:561 Using the new ‘glimmer’ post menu!
2deprecation-identify-source.js:15 DEPRECATION: Components with separately resolved templates are deprecated. Migrate to either co-located js/ts + hbs files or to gjs/gts. Tried to lookup ‘template:components/top-contributors’. [deprecation id: component-template-resolving] This will be removed in ember-source 6.0.0. See https://deprecations.emberjs.com/id/component-template-resolving
Discourse v3.4.0.beta4-dev — https://github.com/discourse/discourse/commits/380910aedd — Ember v5.12.0
deprecation-identify-source.js:15 DEPRECATION: Components with separately resolved templates are deprecated. Migrate to either co-located js/ts + hbs files or to gjs/gts. Tried to lookup ‘template:components/whos-online’. [deprecation id: component-template-resolving] This will be removed in ember-source 6.0.0. See https://deprecations.emberjs.com/id/component-template-resolving for more details.
This might be the cause. In this case, you are probably rate limited.
You might check the network tab of developer console, if there are more requests, when right sidebar blocks are enabled.
(1) I am an admin, trust level 4, so why is “DISCOURSE_SKIP_PER_IP_RATE_LIMIT_TRUST_LEVEL” not bypassing me for any rate limit?
Global per-ip rate limits
These limits apply to every unique IP address that hits the Discourse application. (files that are served directly from the filesystem or the CDN are excluded)
By default this rate limit is enabled, you may disable it or set it to a reporting mode.
DISCOURSE_MAX_REQS_PER_IP_MODE : default block, this rate limit applies out of the box. (other options are warn, warn+block, and none)
DISCOURSE_MAX_REQS_PER_IP_PER_MINUTE: number of requests per IP per minute (default is 200)
DISCOURSE_MAX_REQS_PER_IP_PER_10_SECONDS: number of requests per IP per 10 seconds (default is 50)
DISCOURSE_MAX_ASSET_REQS_PER_IP_PER_10_SECONDS: number of asset (avatars/css) requests per IP per 10 seconds (default is 200)
DISCOURSE_MAX_REQS_RATE_LIMIT_ON_PRIVATE: should the rate limit apply to private IPs accessing Discourse? default is false.
DISCOURSE_SKIP_PER_IP_RATE_LIMIT_TRUST_LEVEL: use per user rate limits vs IP rate limits for users with this trust level or more (default 1)
To amend the limits add the desired change into your app.yml file in the env section.
I also checked the nginx access log, it shows differing IP’s for our users. (I saw in a much earlier topic where this was an issue, everyone was using the same IP address for access)
Even with the changes described above and after rebuilding the app, I see the rate limit warning in the browser console if I enable Right Sidebar Blocks.
How do I echo or otherwise determine the actual value of, for example: DISCOURSE_SKIP_PER_IP_RATE_LIMIT_TRUST_LEVEL
Also, if I disable the Right Sidebar Blocks, I do not see any rate limit warnings in the browser console if I traverse topics at the same rate I do with Right Sidebar Blocks enabled.
I suggest digging through search for prior discussions about rate limiting.
I’m not profound in this topic but to my understanding rate limiting is applied in two stages: first nginx does rate-limiting (not knowing about trust levels) and then the rails app does another layer of protection.
If you wish to test the hypothesis that you encounter rate limits within the nginx layer, you may comment out the following line in your app.yml:
I have no rate limits set in the nginx I use as a reverse proxy, and I will try what you suggest to see what the container is doing.
I am loading Leaderboard, Top Producers and Events in Right Sidebar Blocks.
I will report back, thx
I bet you are correct, so what are good but more lax values for these settings in /var/discourse/templates/web.ratelimited.template.yml? Is it simply trial and error?