-
Notifications
You must be signed in to change notification settings - Fork 2k
Zenbot hanging #2763
Comments
it's starting to look like this is a weird re-entry issue. why is getNext() an async function but await isn't used when it's called? |
a dirty fix to this was to change limit: 100 to limit: 100000000, it now works 100% of the time |
note: setting limit to very high values does not solve the issue, it just makes it much much more difficult to reproduce |
Replacing most of the getNext() function with simply:
functions great (so far...) |
Down to two lines, works perfectly. Doesn't have the "symmetry" feature, but I don't understand that well enough to implement it. Any explanations welcome:
|
Describe the problem
Zenbot just holds on a regular basis during simulations.
I added tons of console.logs to trace the issue, and it seems like I get to onCollectionCursorEnd in sim.js, with numTrades != 0 it goes into the "else", so the engine.exit(exitSim) isn't hit, and from there it just does nothing anymore.
What is this "else" for and what is supposed to happen once it's hit?
I do not think this has to do with my custom strategy, but I could very well be wrong. Would still appreciate any idea in debugging this so I can fix whatever is happening here.
here's the order things happen during a crash:
[ undefined,
1609032111821,
{ _id: 'binance.1INCH-USDT-783797',
trade_id: '783797',
time: 1609032125360,
size: 126,
price: 1.4184,
side: 'buy',
id: 'binance.1INCH-USDT-783797',
selector: 'binance.1INCH-USDT' },
100,
100 ]
{ query:
{ selector: 'binance.1INCH-USDT',
time: { '$lte': 1609459200000, '$gt': 1609032125360 } },
sort: { time: 1 },
limit: 100,
timeout: false }
The text was updated successfully, but these errors were encountered: