Skip to content

Settings for API Rate Limiter not working #13441

@Serjal

Description

@Serjal

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.
image
Response header of first post message
image

Steps to reproduce:

  1. Go to Rocket.Chat admin panel
  2. Adjust "Default number calls to the rate limiter"
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions