# High usage of S3 head\_bucket requests during initial migration

**URL:** https://meta.discourse.org/t/high-usage-of-s3-head-bucket-requests-during-initial-migration/268447
**Category:** Support
**Tags:** s3
**Created:** [June 15, 2023, 1:05pm UTC](https://meta.discourse.org/t/high-usage-of-s3-head-bucket-requests-during-initial-migration/268447 "2023-06-15T13:05:09Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![V1ktor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/v1ktor/32/232406_2.png) [@V1ktor](https://meta.discourse.org/u/V1ktor)
#### Post date: [June 15, 2023, 1:05pm UTC](https://meta.discourse.org/t/high-usage-of-s3-head-bucket-requests-during-initial-migration/268447/1 "2023-06-15T13:05:09Z")

</div>

We switched our forum to store uploads and backups with Backblaze B2. We went through the S3 migration and rebake (which I left overnight to complete). Everything works.

B2 allows free 2500 class C transactions per day, which `head_bucket` falls under (`s3_head_bucket`). We hit that limit, with 2300 being `head_bucket` with only 5300 `put_object` requests (`s3_put_object`).

I want to understand better how Discourse uses `head_bucket` for S3 storage. Based on the [docs](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3/client/head_bucket.html), it’s used to check if a bucket exists. But 2300 requests seem a bit high to continuously check if buckets exist.

I would appreciate any information about `head_bucket` usage in Discourse. Thanks.

* * *

_Hopefully, this post will also be a reference for anyone seeking this information. If anyone wants to use B2 free plan, they will hit the 2500 class C transactions daily cap and won’t be able to perform any more requests until the daily limit is reset or the payment method is added._

---

<div class="post-metadata">

### Author: ![V1ktor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/v1ktor/32/232406_2.png) [@V1ktor](https://meta.discourse.org/u/V1ktor)
#### Post date: [June 16, 2023, 8:01pm UTC](https://meta.discourse.org/t/high-usage-of-s3-head-bucket-requests-during-initial-migration/268447/2 "2023-06-16T20:01:00Z")

</div>

Since the original post, we have 5500 `put_object` requests and 2900 `head_bucket`. Still seems awfully high for no apparent reason.
