dutu / poloLender

Free, open source, high performance bot for lending funds on Poloniex exchange
https://github.com/dutu/poloLender
Other
160 stars 47 forks source link

Need to adjust timeout again (Poloniex API asking for 130sec timeout) #40

Closed Shoananas closed 7 years ago

Shoananas commented 7 years ago

Hello,

Today I've seen a lot of logs like this: notice: returnActiveLoans: Poloniex error 429: Too Many Requests. This IP has been banned for 2 minutes. Please adjust your timeout to 130 seconds.

So I guess Poloniex changed their timeout policy again and the bot needs to be adjusted to this new policy. Other than that, the bot has been working really nice for more than a week without any interruption for me!

So, thank you again for your hard work!

dutu commented 7 years ago

@Shoananas, I've noticed the error has occurred a couple of times since yesterday. I can increase the timeout, although I'm not sure it will resolve the issue since I haven't see a timeout error prior this 429 error code.,

Can you confirm if in your case the error 492 is preceded by a timeout error? Thanks

Shoananas commented 7 years ago

Nope I didn't see the timeout error, the first error 429 happens like this: notice: returnOpenLoanOffers: Poloniex error 429: Too Many Requests. This IP has been banned for 2 minutes. Please adjust your timeout to 130 seconds.

and then: notice: returnActiveLoans: Poloniex error 429: Too Many Requests. This IP has been banned for 2 minutes. Please adjust your timeout to 130 seconds.

all the way untill I restarted the bot (after 5 min pause)

dutu commented 7 years ago

@Shoananas , since there was no timeout error prior the error code 429, it's not clear that increasing the timeout value will solve the issue. The occurrence of this situation seems to be very infrequent. We should keep an eye on it and see if we can come up with something more likely to solve it.

BTW, you mentioned that the issue diapered after restating the bot. Are you using it on Heroku? (as the restart may have given you a new IP address)

Shoananas commented 7 years ago

Yes, I am using it on Heroku. I stopped the bot (maintenance mode ON) for 5min and then disabled the maintenance mode.

I'll keep you informed if I run in another 429 error.

dutu commented 7 years ago

@Shoananas, these errors seem to be quite infrequent, also the reason why Poloniex server is responding with this error code is not clear (although the error message suggests a timeout issue, timeouts have not been seen in conjunction with this error). I will not do any code modification at this stage.