Increase the v2 API rate limit

Still need help?

The Atlassian Community is here for you.

Ask the community

This article only applies to the Atlassian server platform. Learn more about the differences between cloud and server.

Purpose

The Hipchat Server API v2 rate limits user generated tokens to 100 requests per 5 minutes. In certain implementations, the default rate limit might need to be increased.

Solution

The API rate limiting in place protects the server from a flood of requests to the Coral service, which controls both internal and external API requests. Flooding this service can result in slow message delivery, failed file uploads and problems logging in.

If you are on a Hipchat Data Center deployment using the AWS CloudFormation template, too many calls to Coral can cause a node to become slow and fail the system's health check. Nodes that fail the health check are shut down and replaced.

  1. Generate a user API token via Edit Profile > API access 
  2. Display the current rate limit value:

    curl -s --include --insecure https://127.0.0.1/v2/user?auth_token=<token> | grep X-Ratelimit-Limit 
  3. Change the value:

    sudo dont-blame-hipchat -c "HIPCHATTOKEN=<token> HIPCHATRATELIMIT=<new_rate_limit> /opt/atlassian/hipchat/virtualenv/bin/python /opt/atlassian/hipchat/sbin/_ratelimit.py"
  4. Display the new rate limit value:

    curl -s --include --insecure https://127.0.0.1/v2/user?auth_token=<token> | grep X-Ratelimit-Limit

Last modified on Jan 19, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.