Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximum number of messages within timeframe incorrect #464

Open
teriky opened this issue Nov 6, 2021 · 3 comments
Open

Maximum number of messages within timeframe incorrect #464

teriky opened this issue Nov 6, 2021 · 3 comments

Comments

@teriky
Copy link

teriky commented Nov 6, 2021

When sending the 6th message within a timeframe of 24h one got the message "Sie haben die Begrenzung von 6 Anfragen in 6 Stunden überschritten. Dies ist eine automatische Vorsichtsmaßnahme."

This is not correct because the message is displayed after sending 5 messages within 24h: 5 messages sent within 6 hours, the 6th is rejected).

A similar error occures when sending the 8th message within 24 hours (7 messages sent, the 8th is rejected).

@stefanw
Copy link
Member

stefanw commented Nov 7, 2021

Sorry, I don't quite understand the issue.

When sending the 6th message within a timeframe of 24h one got the message
...
This is not correct because the message is displayed after sending 5 messages within 24h

Is it the 6th or the 5th message? What did you do, what message did you get and what message do you think you should get?

@teriky
Copy link
Author

teriky commented Nov 7, 2021

Steps to reproduce:

  • precondition: no messages sent within the last 24 hours
  • send 5 messages within 1 hour up to 6 hours
  • send the 6th message within the same 1 hour up to 6 hours

Expected behaviour: the 6th message is sent, no hint is displayed

Actual behaviour: the 6th message is not sent, the hint "You have exceeded the limit of 6 requests in 6 hours. This is an automatic precaution." is displayed.

hint message

The same behaviour occurs with the limitation of 8 messages per 24 hours: Only 7 messages within 24 hours can be sent.

As far as I understand is the systems limit defined as sending a maximum of 2 messages within 5 minutes, a maximum of 6 messages within 6 hours, or a maximum of 8 messages per day. Whatever occurs first.

@stefanw
Copy link
Member

stefanw commented Nov 19, 2021

I think one confusion point is that there were no distinct throttle messages for sending requests and sending messages in requests. This is fixed.

The throttle configs for requests and messages are distinct and are documented here.

The fail condition is message_count + 1 > fail_count which seems correct to me. I also see you closed your PR again.

There's a basic test for request throttling. Maybe you can come up with a failing test for messages?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants