# What the max size of "Text" in motoko

**URL:** https://forum.dfinity.org/t/what-the-max-size-of-text-in-motoko/5238
**Category:** Developers
**Created:** [June 16, 2021, 7:40am UTC](https://forum.dfinity.org/t/what-the-max-size-of-text-in-motoko/5238 "2021-06-16T07:40:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![72521](https://avatars.discourse-cdn.com/v4/letter/7/c57346/32.png) [@72521](https://forum.dfinity.org/u/72521)
#### Post date: [June 16, 2021, 7:40am UTC](https://forum.dfinity.org/t/what-the-max-size-of-text-in-motoko/5238/1 "2021-06-16T07:40:36Z")

</div>

i have a map like `[(Text, Text)]` in my motoko backend.  
i want to know how big can “Text” store. what the max size can Text store  
any where i can test or find those boundary.  
also have same question about other type such as " Buffer"

---

<div class="post-metadata">

### Author: ![nomeata](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/nomeata/32/733_2.png) [@nomeata](https://forum.dfinity.org/u/nomeata)
#### Post date: [June 16, 2021, 9:42am UTC](https://forum.dfinity.org/t/what-the-max-size-of-text-in-motoko/5238/2 "2021-06-16T09:42:49Z")

</div>

In theory, a single `Text` can be 2GB or so, but you’ll run into garbage collection limitation at this size.

So the size of a single `Text` is not limiting; the size of your total live data is more relevant.

---

<div class="post-metadata">

### Author: ![72521](https://avatars.discourse-cdn.com/v4/letter/7/c57346/32.png) [@72521](https://forum.dfinity.org/u/72521)
#### Post date: [June 16, 2021, 10:52am UTC](https://forum.dfinity.org/t/what-the-max-size-of-text-in-motoko/5238/3 "2021-06-16T10:52:12Z")

</div>

During my testing  
i call my canister with a size about 2mb. the canister will cause error.  
and i got something like “ic0.msg\_reply\_data\_append: application payload size (2621575) cannot be larger than 2097152”

2097152 is equal to 2mb

and i found `MAX_INTER_CANISTER_PAYLOAD_IN_BYTES` and some variables like `max_reply_size` here

> <https://github.com/dfinity/ic/blob/master/rs/system_api/src/lib.rs#L870>

it seems limited to 2mb rather than 2GB.

can someone explain about those variables.

---

<div class="post-metadata">

### Author: ![nomeata](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/nomeata/32/733_2.png) [@nomeata](https://forum.dfinity.org/u/nomeata)
#### Post date: [June 16, 2021, 11:15am UTC](https://forum.dfinity.org/t/what-the-max-size-of-text-in-motoko/5238/4 "2021-06-16T11:15:47Z")

</div>

Ah, but that is unrelated to the max size of `Text` in Motoko; you are facing the message size limit. But that affects only messages (you can store much more), and is independent of the programming language you are using.
