Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/api/v3/transactionsByMasterchainBlock has error. timeout: context deadline exceeded #90

Open
duktig666 opened this issue Oct 1, 2024 · 6 comments

Comments

@duktig666
Copy link

I'm running ton-indexer, other APIs are fine, but /api/v3/transactionsByMasterchainBlock and /api/v3/transactions have timeout: context deadline exceeded.

index-api-1         | 2024/10/01 00:53:26 Code: 500 Path: /api/v3/transactionsByMasterchainBlock  API Key:  Queries: map[limit:100 offset:0 seqno:40729340 sort:asc] Body:  Error: timeout: context deadline exceeded
@duktig666
Copy link
Author

Can the API set the timeout for the query?

@hsmang
Copy link

hsmang commented Oct 4, 2024

Can you add a header X-Timeout: 60000 (ms) when making a request to the index-api?

@Farshad12z
Copy link

#000000

@duktig666
Copy link
Author

Can you add a header X-Timeout: 60000 (ms) when making a request to the index-api?

Adding an X-Timeout: 60000 request header does work.

Is it possible to avoid this problem at the web api server level? It may be better to avoid the need for the client to configure additional timeouts to use.

@hsmang
Copy link

hsmang commented Oct 8, 2024

@duktig666
I added index to postgresql as a temporary measure.

CREATE INDEX CONCURRENTLY mc_block_seq_index ON transactions (mc_block_seqno);

CREATE INDEX CONCURRENTLY messages_index_1 ON messages (msg_hash, direction);

CREATE INDEX CONCURRENTLY latest_account_states_index ON latest_account_states (account);

@duktig666
Copy link
Author

Then I should go to the psql database and manually add these indexes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants