-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Settings for API Rate Limiter not working #13441
Description
Description:
I am trying to run a simple loadtest on Rocket.Chat using JMeter. In the test multiple users are registered , then logged in and post multiple messages to the general channel using the REST API. After registering and logging in 10 users and posting 10 messages I get the error: "Error, too many requests. Please slow down. You must wait 60 seconds before trying this endpoint again. [error-too-many-requests]","errorType":"error-too-many-requests". After adjusting the number of calls in the API Rate Limiter or disabling it login seems fine. However the value of X-Rate-Limit-Remaining seems unaffected for registering and posting messages.

Response header of first post message

Steps to reproduce:
- Go to Rocket.Chat admin panel
- Adjust "Default number calls to the rate limiter"
- Use the attached JMeter test to create API Requests
rocketchat.zip
Expected behavior:
Adjusting the "Default number calls to the rate limiter" influences X-Rate-Limit-Remaining and enables more REST API requests to be sent.
Actual behavior:
Adjusting "Default number calls to the rate limiter" has no effect on API Calls for register and post messages. Am I understanding the usage of API Rate Limiter correctly or is this expected behavior?
Server Setup Information:
- Version of Rocket.Chat Server: 0.74.2
- Operating System: Ubuntu 18.04
- Deployment Method: docker
- Number of Running Instances: 1
- MongoDB Version: 4.1