-
Notifications
You must be signed in to change notification settings - Fork 217
[Binance] Orderbook initial snapshot #227
[Binance] Orderbook initial snapshot #227
Conversation
…change dependency to 4.3.9, needed for acceess to convert order book
…itions and simplified the cleanup logic. Also added some commentary here since the way this is working, and why it's working that way, isn't massively obvious. There is definitely a thread leak here (BinanceManualExample never completes) which could explain some memory leaks I'm seeing, but will tackle that separately.
… up partial snapshots, we'll just keep trying to create the initial snapshot, ignoring any updates, until the snapshot is created successfully. Means we can guarantee all the updates contain correct, full order books.
@davidjirovec : drat. Thanks for that report. Really useful. Did you confirm that this wasn't occurring beforehand? I'll look into this in the next couple of days. |
Just checked my production app and it has been quietly cycling every few hours due to OOM errors, but only slightly more often than it always has. There's definitely already a memory leak somewhere. If this has made it worse, that provides some clues perhaps... |
I didn't use xchange-stream binance until this PR. You used some previous version even when it gave you OOM? :) |
Background thread issuing a System.exit() every few hours and the container restarts itself. Filth I know, but I have had more important things to worry about. Memory leaks are somewhere below Urgent. I will look at this properly now tho. |
Ok, I understand :) |
[snipped] - see below |
1 similar comment
[snipped] - see below |
Confirmed. This memory leak goes away when #191 is merged. @davidjirovec , if you'd like to confirm yourself, compare the results of running your test against this branch (
In short, I think this PR is OK. It's just (yet) another reason why #191 needs to be merged. |
Thanks, I will test it. |
You should find that |
Sorry @davidjirovec, you were quite right, |
I was indeed confusing myself. I've now replicated this on OK, I will go back to trying to work out what the cause is. |
@davidjirovec - found it, fixed Highlighted is a manual GC. |
Tested myself, looks good! |
@davidjirovec, are you able to post an accepting review (see the Review Required section below)? Then we can get it merged. |
Says "At least 1 approving review is required by reviewers with write access." :-/ |
@davidjirovec It just needs someone with write access to also accept - I can sort this out for you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based off approving review @davidjirovec
Resolves #86. Explanation given on there.