bmino / binance-triangle-arbitrage

Detect in-market cryptocurrency arbitrage
MIT License
1.07k stars 336 forks source link

ETIMEDOUT #108

Closed dawz32 closed 3 years ago

dawz32 commented 4 years ago

Please help me !!! Thanks :-)

binance-triangle-arbitrage@5.5.1 start /Users/Kevin/binance-triangle-arbitrage-5.5.1 node src/main/Main.js

WARNING! Order execution is enabled!

Checking configuration ... Successfully pinged Binance in 435 ms Found 691/958 currently trading tickers Found 386 triangular relationships Checking balances ... Opening 524 depth websockets ... /Users/Kevin/binance-triangle-arbitrage-5.5.1/node_modules/node-binance-api/node-binance-api.js:4822 if ( err ) throw err; ^

Error: ETIMEDOUT at Timeout. (/Users/Kevin/binance-triangle-arbitrage-5.5.1/node_modules/request/request.js:848:19) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7) { code: 'ETIMEDOUT', connect: true } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! binance-triangle-arbitrage@5.5.1 start: node src/main/Main.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the binance-triangle-arbitrage@5.5.1 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/Kevin/.npm/_logs/2020-08-17T20_14_50_464Z-debug.log

hyuts-dennis commented 4 years ago

Well, I would say for starters leave a copy of your config file save the api details, you can increase the "RECEIVE_WINDOW" value and set the "USE_SERVER_TIME" value to true. I believe the under the SIZE value for DEPTH being too high can cause this as well, but I am just basically getting rid of this issue myself and am mostly just sharing some things I remember from reading while fixing this in my own machine today.

One thing that helped me fix this issue is that I went and configured my OS's timesync settings from scratch and just made sure that my system time was properly being synced and wasn't off enough to cause the program to either fail to start or give constantly erroneous age values through its use. That being said - this may not be an issue for you, but I remembered today that because of the defaults in my particular system, the time is not synced perfectly on purpose and you probably won't find that to be an issue. None the less, thought I'd mention it.

bmino commented 4 years ago

The workaround for ETIMEDOUT errors is to increase the TIMING.RECEIVE_WINDOW to something higher like 10000. I suspect that increasing INITIALIZATION_INTERVAL to something higher like 1000 could help you here.

This problem is occurring when attempting to make a REST call for a depth cache snapshot. The bot is making 524 of these calls in quick succession and your internet / cpu might have gotten overloaded