# 1MB max chunk size

**URL:** <https://discuss.ipfs.tech/t/1mb-max-chunk-size/4687>\
**Category:** Help\
**Created:** [January 15, 2019, 2:23pm UTC](https://discuss.ipfs.tech/t/1mb-max-chunk-size/4687 "2019-01-15T14:23:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![john1deer](https://avatars.discourse-cdn.com/v4/letter/j/9fc348/32.png) [@john1deer](https://discuss.ipfs.tech/u/john1deer)\
**Post date:** [January 15, 2019, 2:23pm UTC](https://discuss.ipfs.tech/t/1mb-max-chunk-size/4687/1 "2019-01-15T14:23:01Z")

</div>

It seems that the maximum block size is set to 1MB:  
// BlockSizeLimit specifies the maximum size an imported block can have.  
var BlockSizeLimit = 1048576 // 1 MB

(1) why 1MB? It seems that this value was once 2MB

(2) the limit is part of `unixfs`. What happens if a larger chunk is added with a lower level interface (e.g. `ipfs dag add`)?

---

<div class="post-metadata">

**Author:** ![stebalien](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/stebalien/32/156_2.png) [@stebalien](https://discuss.ipfs.tech/u/stebalien)\
**Post date:** [January 17, 2019, 10:30am UTC](https://discuss.ipfs.tech/t/1mb-max-chunk-size/4687/2 "2019-01-17T10:30:22Z")

</div>

We limit network messages to 2MiB. The maximum block size of 1MiB allows for message/framing overhead.

> the limit is part of unixfs. What happens if a larger chunk is added with a lower level interface (e.g. ipfs dag add)?

Anything up to `2MiB - epsilon` should work. However, if the block gets too large, bitswap will refuse to accept this block.
