this post was submitted on 03 Aug 2023
9 points (100.0% liked)

Lemmy Support

4651 readers
1 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS
 

I'm getting rate_limit_error on the API when posting posts with just title+url. What is the default rate limit for posts? Do all requests have a rate limit or only posts?

Can I get the rate limit from an instance with a request to the API?

Edit:

{
  "local_site_rate_limit": {
    "id": 1,
    "local_site_id": 1,
    "message": 180,
    "message_per_second": 60,
    "post": 6,
    "post_per_second": 600,
    "register": 3,
    "register_per_second": 3600,
    "image": 6,
    "image_per_second": 3600,
    "comment": 6,
    "comment_per_second": 600,
    "search": 60,
    "search_per_second": 600,
    "published": "2023-02-05T03:52:36.832982"
  }
}

I'm getting limit rate with a 10 second delay so 1/post_per_second = 0,0016 seconds / post delay is not right. So what do those even mean and what is the delay I should have between posts?

top 4 comments
sorted by: hot top controversial new old
[–] nachtigall@feddit.de 10 points 1 year ago

A GET call to /api/v3/site also returns a parameter local_site_rate_limit where the different limits are shown.

[–] RoundSparrow@lemmy.ml 2 points 1 year ago

Is this against a live server, or one of the testing servers?

There is logic within lemmy to try and detect the same network - and I can imagine it gets false positives with a variety of situations. Your one client is probably not the cause if you are posting 1 every 10 seconds.

[–] CMahaff@lemm.ee 2 points 1 year ago* (last edited 1 year ago)

This bit me too.

How I believe you would read it for posts, using the values you posted, is "6 posts are allowed every 600 seconds". The variables are poorly named IMO.

Following those rules, my own application seemed to stop getting rate limited.

[–] pornhubfan@sh.itjust.works 1 points 1 year ago

don't spam.