Closed bitcoinvsalts closed 6 years ago
Could you try updating to the latest version?
I am still getting those ETIMEDOUT errors with the new code version
node-binance-api.js:42
if ( error ) throw error;
^
Error: ETIMEDOUT
Hmmm. I am not sure as to why. The only thing I can think of is maybe opening too many websocket connections too quickly could get your IP temporarily banned. If this is the case you need to add a 150-250ms delay between each new connection being opened
I dont think it's the issue I wait 2 sec between my api request. If I restart the code right after the issue, it runs normally until a few minutes and I get the issue again. When I am banned, it does allow me to run it for a few minutes.
On Wed, Jan 10, 2018 at 4:27 PM, Jon Eyrick notifications@github.com wrote:
Hmmm. I am not sure as to why. The only thing I can think of is maybe opening too many websocket connections too quickly could get your IP temporarily banned. If this is the case you need to add a 150-250ms delay between each new connection being opened
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jaggedsoft/node-binance-api/issues/48#issuecomment-356758408, or mute the thread https://github.com/notifications/unsubscribe-auth/AM0R9WkCWJwShdFlwoFOoi2SwotUxY44ks5tJTlCgaJpZM4RZvA- .
-- Hervé Fulchiron JSapp.me
I dont know if helps but I am getting this issue running this part of the code:
publicRequest(base+'v1/depth', {symbol:symbol, limit:limit}, function(json) { if ( messageQueue && typeof messageQueue[symbol] === 'object' ) { info[symbol].firstUpdateId = json.lastUpdateId; depthCache[symbol] = depthData(json); for ( let depth of messageQueue[symbol] ) { depthHandler(depth, json.lastUpdateId); } delete messageQueue[symbol]; if ( callback ) callback(symbol, depthCache[ symbol]); } });
On Wed, Jan 10, 2018 at 4:29 PM, Herve Fulchiron herve76@gmail.com wrote:
I dont think it's the issue I wait 2 sec between my api request. If I restart the code right after the issue, it runs normally until a few minutes and I get the issue again. When I am banned, it does allow me to run it for a few minutes.
On Wed, Jan 10, 2018 at 4:27 PM, Jon Eyrick notifications@github.com wrote:
Hmmm. I am not sure as to why. The only thing I can think of is maybe opening too many websocket connections too quickly could get your IP temporarily banned. If this is the case you need to add a 150-250ms delay between each new connection being opened
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jaggedsoft/node-binance-api/issues/48#issuecomment-356758408, or mute the thread https://github.com/notifications/unsubscribe-auth/AM0R9WkCWJwShdFlwoFOoi2SwotUxY44ks5tJTlCgaJpZM4RZvA- .
-- Hervé Fulchiron JSapp.me
-- Hervé Fulchiron JSapp.me
it seems putting a limit to 100 for the depthcache solves my issue
Hi Jon,
I know why I am getting those timeout issues. I am running more than 200 websockets (started every 1sec) and it seems after a while I am getting internal performance issues that create those timeout issues. I am kind of surprised by this idea because my computer does not show any heavy use of the hardware (neither memory neither cpu neither my bandwidth) I am guessing it's more like a port/network limit. I tried it on some of my other machines but I am also getting those issues around 200. I am wondering how many maximum concurrent websockets do you open at once?
Not related. I am big fan of your repo and I plan to use it a lot. I am a full stack JS developer and I just finished a long react native project. As you can see on my page https://jsapp.me/, I was more a react/react native dev guy before but I am trying to transition to offer full stack node.js + binance dev and expertise. I know you are busy these days. If you get some contacts on your repo for dev work using your repo, I am very available. Feel free to redirect them to me.
Thanks again for your good work.
HF
On Wed, Jan 10, 2018 at 4:39 PM, Herve Fulchiron herve76@gmail.com wrote:
I dont know if helps but I am getting this issue running this part of the code:
publicRequest(base+'v1/depth', {symbol:symbol, limit:limit}, function(json) { if ( messageQueue && typeof messageQueue[symbol] === 'object' ) { info[symbol].firstUpdateId = json.lastUpdateId ; depthCache[symbol] = depthData(json); for ( let depth of messageQueue[symbol] ) { depthHandler(depth, json.lastUpdateId); } delete messageQueue[symbol]; if ( callback ) callback(symbol, depthCache[ symbol]); } });
On Wed, Jan 10, 2018 at 4:29 PM, Herve Fulchiron herve76@gmail.com wrote:
I dont think it's the issue I wait 2 sec between my api request. If I restart the code right after the issue, it runs normally until a few minutes and I get the issue again. When I am banned, it does allow me to run it for a few minutes.
On Wed, Jan 10, 2018 at 4:27 PM, Jon Eyrick notifications@github.com wrote:
Hmmm. I am not sure as to why. The only thing I can think of is maybe opening too many websocket connections too quickly could get your IP temporarily banned. If this is the case you need to add a 150-250ms delay between each new connection being opened
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jaggedsoft/node-binance-api/issues/48#issuecomment-356758408, or mute the thread https://github.com/notifications/unsubscribe-auth/AM0R9WkCWJwShdFlwoFOoi2SwotUxY44ks5tJTlCgaJpZM4RZvA- .
-- Hervé Fulchiron JSapp.me
-- Hervé Fulchiron JSapp.me
-- Hervé Fulchiron JSapp.me
Thank you for your kind words, love to hear it. Will do! :)
I have no answer for you on the maximum connections, I'm able to open one websocket for every symbol on binance, but haven't tested too much beyond that. I'll look in to it and test everything as soon as I can
one websocket for every symbol, so it's more than 200 ?
HF
On Fri, Jan 12, 2018 at 3:21 PM, Jon Eyrick notifications@github.com wrote:
Thank you for your kind words, love to hear it. Will do! :)
I have no answer for you on the maximum connections, I'm able to open one websocket for every symbol on binance, but haven't tested too much beyond that. I'll look in to it and test everything as soon as I can
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jaggedsoft/node-binance-api/issues/48#issuecomment-357357355, or mute the thread https://github.com/notifications/unsubscribe-auth/AM0R9bLSt8lF1XGRs_Pcw2G5ClSNFCHsks5tJ8zEgaJpZM4RZvA- .
-- Hervé Fulchiron JSapp.me
I am getting those errors lately any idea why?