- I have multiple parity nodes setup on Digital Ocean and AWS and event watchers attached to these nodes.
- I also have a service to query block numbers and compare versus etherscan's current block number.
- I have real-time event watchers (
event().watch()) attached to these nodes that monitor real-time events on various contracts.
Observations & Problems
- From time to time, the nodes fall behind or get stuck, but they eventually usually catch up. In rare cases, a restart is required.
If there is an event that is logged in this period where the node has fallen behind and is catching up, the event watcher misses that event.
For example, if the node gets stuck on block 5,000,000 (and say current block is 5,000,100), when the node "catches up" to 5,000,100, any events that were emitted in between (5,000,001 to 5,000,099) are missed and not logged
- Any ideas on why do the nodes fall behind? When checking, the nodes are usually connected to 25 peers. AWS instances are t2.large, 250gb SSD so it should have sufficient resources (I suspect it's not a disk write issue)
- Why are events "lost" during "catching up"? Basically
event().watch()does not catch any events if the node falls behind.