Skip to content

Timeout for account with many transactions #2337

@obycode

Description

@obycode

Describe the bug
The API is timing out when attempting to retrieve transactions for an account that has a very large number of transactions, even with a low limit. For example,

https://api.hiro.so/extended/v2/addresses/SP3SBQ9PZEMBNBAWTR7FRPE3XK0EFW9JWVX4G80S2/transactions?limit=30&offset=0

To Reproduce
Steps to reproduce the behavior:

  1. curl -s "https://api.hiro.so/extended/v2/addresses/SP3SBQ9PZEMBNBAWTR7FRPE3XK0EFW9JWVX4G80S2/transactions?limit=30&offset=0"
  2. See error:
{"statusCode":500,"code":"57014","error":"Internal Server Error","message":"canceling statement due to statement timeout"}

Expected behavior
Users should be able to retrieve transactions for any account in a reasonable time.

Note that this shows up in the explorer on the account pages, e.g. https://explorer.hiro.so/address/SP3XXK8BG5X7CRH7W07RRJK3JZJXJ799WX3Y0SMCR?chain=mainnet

Image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions