roq-trading / roq-issues

Issue tracker for Roq's software solutions.
https://roq-trading.com/
1 stars 0 forks source link

[roq-market] MbP Sequencer could cause memory leak #440

Closed thraneh closed 7 months ago

thraneh commented 7 months ago

It was noticed that snapshot request on Binance could be lost when the exchange's rate-limiter had been triggered. This would lead to memory leak due to the MbP Sequencer collecting incremental updates while waiting for the snapshot. The was no back-stop implemented to avoid collecting "forever".

This is the new MbP Sequencer logic

For the roq-binance gateway one can use --mbp_sequencer_timeout flag to control this. Default is 120 seconds.

There is a also an option to cap the number of updates collected in memory, but it's fairly high. Timeout should be the preferred option to control this.

thraneh commented 7 months ago

Have not had any feedback. Closing this for now.