this post was submitted on 22 Aug 2025
140 points (97.9% liked)
Fediverse
36273 readers
341 users here now
A community to talk about the Fediverse and all it's related services using ActivityPub (Mastodon, Lemmy, KBin, etc).
If you wanted to get help with moderating your own community then head over to !moderators@lemmy.world!
Rules
- Posts must be on topic.
- Be respectful of others.
- Cite the sources used for graphs and other statistics.
- Follow the general Lemmy.world rules.
Learn more at these websites: Join The Fediverse Wiki, Fediverse.info, Wikipedia Page, The Federation Info (Stats), FediDB (Stats), Sub Rehab (Reddit Migration)
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Correct, per client IP.
Could be. I try not to speculate on "why" when I don't have access to the answer lol.
I don't recall any of them being from mander (unless they were dealt with before I started testing?), but thanks for taking preventative measures :)
It's the codename for a particular long-term troll and is based off of their original username pattern (which they still use sometimes). I have reason to believe it's also the same troll that used to spam the racist stuff in Science Memes.
These are most of today's batch (minus the JON333 which was just a garden-variety spammer that made it into the last screenshot).
No, they were not in mander.xyz. But I am generally quite relaxed when it comes to accepting applications. I mostly reject an applicant if it is very clear it is not an actual user, and then actively follow up on recent accounts for a short time. So the possibility of silent spammer accounts accumulating over time is always a concern.
Have fun! π
Setting the limits to more reasonable values, like '20 posts per minute', causes the server to stop serving posts. My front page goes blank.
So, I am starting to think that '20 pots per minute' means 'requesting 20 posts per minute' and not 'creating 20 posts per minute'.
I am still having doubts about what these limits mean, but setting reasonable numbers seems to break things, unfortunately.
I replied to your other comment, but most likely cause is the API server not getting the correct client IP. If that's not setup correctly, then it will think every request is from the reverse proxy's IP and trigger the limit.
Unless they're broken again. Rate limiting seems to break every few releases, but my instance was on 0.19.12 before I shut it down, and those values worked.
Thanks! Yes, I saw both messages and I am now going through the NGINX config and trying to understand what could be going on. To be honest, Lemmy is the hobby that taught me what a 'reverse proxy' and a 'vps' are. Answering a question such as 'Are you sending the client IP in the X-Forwarded-For header?' is probably straight forward for a professional but for me it involves quite a bit of learning π
At location /, my nginx config includes:
So, I think that the answer to your question is probably 'yes'. If you did have these rate limits and they were stable, the more likely explanation is that something about my configuration is sub-optimal. I will look into it and continue learning, but I will need to keep my limits a bit high for the time being and stay alert.
Yeah, you are setting it, but that's assuming the variable
$proxy_add_x_forwarded_for
has the correct IP. But the config itself is correct. Is Nginx directly receiving traffic from the clients, or is it behind another reverse proxy?Do you have a separate location block for
/api
by chance, and is theproxy_set_header
directive set there, too? Unless I'm mistaken, location blocks don't inherit that from the/
location.Yes, I see this there. Most of the nginx config is from the 'default' nginx config in the Lemmy repo from a few years ago. My understanding is somewhat superficial - I don't actually know where the variable '$proxy_add_x_forwarded_for' gets populated, for example. I did not know that this contained the client's IP.
I need to do some reading π
https://nginx.org/en/docs/http/ngx_http_proxy_module.html
$proxy_add_x_forwarded_for
is a built-in variable that either adds to the existing X-Forwarded-For header, if present, or adds the XFF header with the value of the built-in$remote_ip
variable.The former case would be when Nginx is behind another reverse proxy, and the latter case when Nginx is exposed directly to the client.
Assuming this Nginx is exposed directly to the clients, maybe try changing the bottom section like this to use the
$remote_addr
value for the XFF header. The commented one is just to make rolling back easier. Nginx will need to be reloaded after making the change, naturally.Thanks!
I was able to crash the instance for a few minutes, but I think I have a better idea of where the problem is. Ths $emote_addr variable seems to work just the same.
In the rate limit options there is a limit for ''Message''. Common sense tells me that this means 'direct message', but setting this to a low number is quite bad. While testing I eventually set it to '1 per minute' and the instance became unresponsive until I modified the settings in the database manually. If I give a high number to this setting then I can adjust the other settings without problem.
"Message" bucket is kind of a general purpose bucket that covers a lot of different endpoints. I had to ask the lemmy devs what they were back when I was adding a config section in Tesseract for the rate limits.
These may be a little out of date, but I believe they're still largely correct:
So, ultimately my problem was that I was trying to set all of the limits to what I thought were "reasonable" values simultaneously, and misunderstood what 'Message' meant, and so I ended up breaking things with my changes without the reason being obvious to me. I looked into the source code and I can see now that indeed 'Messages' refer to API calls and not direct messages, and that there is no 'Direct Message' rate limit.
If I let 'Messages' stay high I can adjust the other values to reasonable values and everything works fine.
Thanks a lot for your help!! I am surprised and happy it actually worked out and I understand a little more π
Hi I think I set the messages too low as well and now no.lastname.nz is down, pointers on how to fix with no frontend?
If you have DB access, the values are in the
local_site_rate_limit
table. You'll probably have to restart Lemmy's API container to pick up any changes if you edit the values in the DB.100 per second is what I had in my configuration, but you may bump that up to 250 or more if your instance is larger.
Thanks:
UPDATE local_site_rate_limit SET message = 999, message_per_second = 999 WHERE local_site_id = 1;
Awesome! Win-win.
π π