0

I have a tool called Tendermint, which is written in Golang. It processes transactions and creates blocks (details are intentionally omitted). Transactions can be submitted through the WebSocket server. Blocks are configured to be created ~ every second.

Now, when I open two or more WS connections and submit more transactions than the application can handle, periodically, Tendermint gets stuck.

long pauses

During this time, it does not create any blocks, but instead spends the significant portion of its time handling WebSocket IO.

CPU profile

I still don't understand the exact nature of these pauses. Maybe someone here knows or can ask the right questions? Also, I'm wondering what the ways to limit the IO are? Throttle each connection?

NOTE: I'm using https://github.com/gorilla/websocket for WebSockets. Our WS server can be found here. Thank you for your time!

UPD 1: I've managed to flatten the pauses by batching responses in our WS server (see https://github.com/tendermint/tendermint/issues/3905#issuecomment-684860429)

melekes
  • 1,880
  • 2
  • 24
  • 30
  • Have you tried to replace those intentionally omitted details by a mock/stub just to narrow down the problem? – Fulldump Aug 30 '20 at 03:02
  • @Fulldump nice suggestion! tried it - the problem went away. the issue seems to only appear when transactions processing is in place. – melekes Sep 01 '20 at 05:44

0 Answers0