Skip to content

Commit 5742c57

Browse files
docs
1 parent 7fed585 commit 5742c57

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

docs/docs/connections/bitbucket-data-center.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,23 @@ In order to index private repositories, you'll need to provide a [HTTP Access To
150150
</Tab>
151151
</Tabs>
152152

153+
## Rate limiting
154+
155+
Bitbucket Data Center supports [rate limiting](https://confluence.atlassian.com/bitbucketserver094/improving-instance-stability-with-rate-limiting-1489803023.html) to protect instance stability. Rate limiting applies to HTTP requests with basic or bearer authentication, which includes the REST API calls Sourcebot makes to sync repositories.
156+
157+
If rate limiting is enabled on your instance, Sourcebot may receive `HTTP 429 (Too Many Requests)` errors during sync. To prevent this, add a rate limiting exemption for the user (service account) whose token is used in your connection config.
158+
159+
To add an exemption:
160+
161+
1. In Bitbucket Data Center, go to **Administration****Rate limiting****Exemptions** tab.
162+
2. Click **Add exemption** and find the service account user.
163+
3. Select **Allow unlimited requests** (recommended) or set a custom token bucket size and refill rate appropriate for your sync volume.
164+
4. Click **Save**.
165+
166+
<Frame>
167+
<img src="/images/bitbucket_rate_limit.png" alt="Bitbucket Data Center rate limiting exemptions tab showing a user with unlimited requests" />
168+
</Frame>
169+
153170
## Troubleshooting
154171
If you're seeing errors like `TypeError: fetch failed` when fetching repo info, it may be that Sourcebot is refusing to connect to your self-hosted Bitbucket instance due to unrecognized SSL certs. Try setting the `NODE_TLS_REJECT_UNAUTHORIZED=0` environment variable or providing Sourcebot your certs through the `NODE_EXTRA_CA_CERTS` environment variable.
155172

130 KB
Loading

0 commit comments

Comments
 (0)