Increase the v2 API rate limit
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.
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.
- Generate a user API token via Edit Profile > API access
Display the current rate limit value:
curl -s --include --insecure https://127.0.0.1/v2/user?auth_token=<token> | grep X-Ratelimit-Limit
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"
Display the new rate limit value:
curl -s --include --insecure https://127.0.0.1/v2/user?auth_token=<token> | grep X-Ratelimit-Limit