# API Error: Memory limit (total) exceeded

**URL:** <https://community.bitquery.io/t/api-error-memory-limit-total-exceeded/307>\
**Category:** GraphQL API\
**Tags:** support, closed\
**Created:** [July 11, 2021, 7:42pm UTC](https://community.bitquery.io/t/api-error-memory-limit-total-exceeded/307 "2021-07-11T19:42:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spencatro](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@Spencatro](https://community.bitquery.io/u/Spencatro)\
**Post date:** [July 11, 2021, 7:42pm UTC](https://community.bitquery.io/t/api-error-memory-limit-total-exceeded/307/1 "2021-07-11T19:42:10Z")

</div>

Howdy BQ folks,

We’re occasionally getting responses like these from bitquery APIs:

```auto
{
    data: { ethereum: { address: [Array] } },
    errors: [
        {
            message: "JSON::ParserError: 416: unexpected token at 'Code: 241, e.displayText() = DB::Exception: Memory limit (total) exceeded: would use 78.01 GiB (attempt to allocate chunk of 5243168 bytes), maximum: 78.01 GiB: while receiving packet from chapi44.api-cluster.local:9000: While executing Remote: While executing CreatingSetsTransform (version 20.8.11.17 (official build))\n" +
            "'",
            locations: [Array],
            path: [Array]
        }
    ]
}

```

Anecdotally it seems to struggle for a while on particular wallet addresses, but eventually will succeed.

The query we are making is attempting to get tokens held in a wallet, roughly:

```auto
{ethereum(network: bsc) {
    address(address: {is: "{ADDRESS}"}) { 
            address 
            balances {
                currency {
                    address
                    decimals
                    name
                    symbol
                }
                value
            }
        }
    }
}

```

How can we get this data without hitting these memory issues?

---

<div class="post-metadata">

**Author:** ![Aleksey](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@Aleksey](https://community.bitquery.io/u/Aleksey)\
**Post date:** [July 22, 2021, 11:01am UTC](https://community.bitquery.io/t/api-error-memory-limit-total-exceeded/307/2 "2021-07-22T11:01:15Z")

</div>

> [@Spencatro](#):
>
> `currency`

It may depend on address, for which addresses you get out of memory?
