Common Errors API

Common Errors API

Table of Contents

  1. Error: Memory limit
  2. Error: Too large array
  3. Error: Too many simultaneous queries
  4. Error: Currency Not Found by Symbol
  5. Error: Timeout Exceeded
  6. Error: CORS Error
  7. Conclusion

When using Bitquery there can be certain errors that are very easy to solve, in this article we will see some of them and their possible solution.
For this article to be useful we recommend you to search your error with Ctrl-F to find the text in the browser

Error: Memory limit

This error usually occurs when we do not put the proper filters in the query. To solve this error we recommend using limit to limit the output combined with offset, as well as specifying dates if possible (time, since, till, etc).

Example message:

[{"message": "ActiveRecord::ActiveRecordError: Response code: 500:\nCode: 241, e.displayText() = DB::Exception: Memory limit (total) exceeded: would use 62. 95 GiB (attempt to allocate chunk of 4240270 bytes), maximum: 62.94 GiB (version 20.8.11.17 (official build))}], "locations":[{"line":3, "column":5}], "path":["ethereum", "dexTrades"]}]

Error: Too large array | Exceed limit 10000 symbols

This error occurs when we pass many variables in an array in the same query. To solve this the ideal is to pass 100 elements (or less) inside an array until we complete our goal

Example message:

{"errors":[{"message": "Variable 'address' array size 308 exceeds ths limit 100, reduce array"}], "data":{}}
[ { "message": "Query size 67443 exceed limit 10000 symbols, reduce the query or use variables" } ]
Variable '{}' array size 308 exceeds ths limit 100, reduce array

Error: Too many simultaneous queries

This error occurs when you make too many queries in a short time, to solve it the ideal is to have a logic to make the queries during time lapses, check your calls per minute here Pricing - Bitquery. If the problem persists contact support

Example message:

[ { "message": "ActiveRecord::ActiveRecordError: Response code: 500:\nCode: 202, e.displayText() = DB::Exception: Too many simultaneous queries. Maximum: 100 (version 20.8.11.17 (official build))}", "locations": [ { "line": 3, "column": 5 } ], "path": [ "ethereum", "dexTrades" ], "error_type": "server" } ]

Error: Currency Not Found by Symbol

This error usually occurs because we have passed an invalid argument. Note that it may not always be possible to use a token symbol to perform a search or to filter.
Example message:

[ { "message": "Currency not found by symbol 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", "locations": [ { "line": 3, "column": 5 } ], "path": [ "ethereum", "dexTrades" ], "error_type": "client" } ]

Error: Timeout Exceeded

This error usually occurs because the query is not optimized, try adding more filters and limiting the output.
Example message:

[ { "message": "ActiveRecord::ActiveRecordError: Response code: 500:\nCode: 159, e.displayText() = DB::Exception: Timeout exceeded: elapsed 30.004013897 seconds, maximum: 30: While executing Remote (version 20.8.11.17 (official build))\n", "locations": [ { "line": 3, "column": 5 } ], "path": [ "ethereum", "arguments" ], "error_type": "server" } ]

Error: CORS Error

This error usually occurs when we do not have CORS configured correctly on our end. To solve it, configure the header of the request correctly.
Example:

mode: 'no-cors'

Example message:

Access to fetch at 'https://graphql.bitquery.io/' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Conclusion

If the article did not help you find a solution to your problem you can contact support or reply to this article. If you have a bug that is not listed here, you can also contact support or reply to this article.