Open vataops opened 1 month ago
@vataops 안녕하세요. !! 저도 같은 상황을 겪었습니다. 전 개인적으로 우선 DB 인덱스를 추가했습니다. 한번 해보실래요 ?? 물론 이게 답은 아닐겁니다...
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);
같은 한국분이라 반갑습니다 ㅠㅠ
@hsmang 한국분이신가요ㅎㅎ 고생이 많으십니다 ㅠㅠ 감사합니다!
@vataops 네.. ㅋㅋㅋ 아마 인덱스 추가하시면 속도는 바로 해결되실거에요 ! 하지만 인덱스를 안건 이유가 있을 것 같기도해서 조심스럽습니다..
Postgres DB server spec
We are currently running two servers: one for a TON archive node and another dedicated to indexing. The index server hosts PostgreSQL and an API, where we use workers to gather chaindata from the archive node.
The issue we’re facing is that the data has grown to almost 1TB, and the query time for the /api/v3/masterchainInfo method is extremely long. Even though we’ve set the timeout to 50 seconds, sometimes it just barely manages to respond after 40 seconds, but now it’s not responding within the timeout at all.
There doesn’t seem to be any connection overload. Even after removing Redis, the same error occurs.
Our DB server isn’t underpowered, so I’m not sure why the DB queries are almost stalling. Could you help us figure out what’s causing this issue?
We’re running it with Docker, and we’ve increased resource usage with the following configuration.