BitBotFactory / MikaLendingBot

Automated lending on Cryptocurrency exchanges Poloniex and Bitfinex
http://poloniexlendingbot.readthedocs.io/en/latest/index.html
MIT License
1.11k stars 345 forks source link

bot stopped and not restarting #418

Closed plusha74 closed 7 years ago

plusha74 commented 7 years ago

i placed bot on pythonanywhere. he worked for 3 days with non-critical different errors, but today he finally stopped. I have a lot of errors (timeout), and today i got [Errno 104].

2017-07-08  18:03:20 Error: <urlopen error timed out> Requesting returnActiveLoans
2017-07-08  17:57:36 Error: <urlopen error timed out> Requesting returnActiveLoans
2017-07-08  17:52:03 Error: <urlopen error timed out> Requesting returnActiveLoans
2017-07-08  17:46:30 Error: <urlopen error timed out> Requesting returnActiveLoans
2017-07-08  17:40:27 Error: <urlopen error timed out> Requesting returnActiveLoans
2017-07-08  17:34:26 Error: <urlopen error timed out> Requesting returnActiveLoans
!!!!!!!!!!2017-07-08  17:28:56 Error: <urlopen error [Errno 104] Connection reset by peer>
  Requesting returnActiveLoans**
2017-07-08  17:23:28 Error: <urlopen error timed out> Requesting returnActiveLoans
2017-07-08  13:26:50 Error: <urlopen error timed out> Requesting
  returnAvailableAccountBalances
2017-07-08  13:10:00 Error: <urlopen error timed out> Requesting returnActiveLoans
2017-07-08  13:04:22 Error: <urlopen error timed out> Requesting returnTicker
2017-07-08  12:38:02 Error: <urlopen error timed out> Requesting
  returnAvailableAccountBalances
2017-07-08  10:30:04 Error: Connection timed out. Please try again. Requesting
  returnOpenLoanOffers
2017-07-08  07:30:46 Error: <urlopen error timed out> Requesting returnTicker
2017-07-08  06:53:27 Error: Connection timed out. Please try again. Requesting
  returnAvailableAccountBalances
2017-07-08  05:34:34 Error: Connection timed out. Please try again. Requesting
  returnBalances
2017-07-08  04:10:27 Error: Connection timed out. Please try again. Requesting
  returnBalances
2017-07-08  03:43:49 Error: Connection timed out. Please try again. Requesting
  returnActiveLoans
2017-07-08  03:22:24 Error: <urlopen error timed out> Requesting returnTicker
2017-07-08  03:00:09 Error: Connection timed out. Please try again. Requesting
  returnActiveLoans
2017-07-08  02:27:51 Error: <urlopen error timed out> Requesting returnActiveLoans
2017-07-08  01:55:36 Error: <urlopen error timed out> Requesting returnActiveLoans
2017-07-08  01:07:01 Error: Connection timed out. Please try again. Requesting
  returnAvailableAccountBalances
2017-07-08  01:01:45 Error: Connection timed out. Please try again. Requesting
  returnActiveLoans
2017-07-08  00:56:25 Error: Connection timed out. Please try again. Requesting
  returnActiveLoans
2017-07-08  00:40:46 Error: Connection timed out. Please try again. Requesting
  returnOpenLoanOffers
2017-07-07  23:58:38 Error: <urlopen error timed out> Requesting
  returnAvailableAccountBalances
2017-07-07  23:52:55 Error: <urlopen error timed out> Requesting returnBalances
2017-07-07  23:47:23 Error: Connection timed out. Please try again. Requesting
  returnActiveLoans
2017-07-07  23:41:52 Error: <urlopen error timed out> Requesting returnActiveLoans

I killed process, killed console, restarted it and received:

2017-07-08 22:02:59 Error: <urlopen error timed out> Requesting returnActiveLoans
2017-07-08 22:01:26 Error: <urlopen error timed out> Requesting returnActiveLoans
again and again

how to start bot again? what am I doing wrong? Thanks for doing this! Sorry, my English is not so good.

tamaskan commented 7 years ago

Looks like the typical Poloniex-Timeout-Issues. The Bot is working, these Errors are normal for Poloniex.

plusha74 commented 7 years ago

I setup a telegram notification once an hour about my loans to control the work of the bot. today he stopped sending notifications. i check status and he is empty (bot not working) Pay attention to the last errors time. Every 5 minutes the bot trying to connect again and again and can't do this

rnevet commented 7 years ago

did you increase your timeout value in config?

plusha74 commented 7 years ago

i did it right now. i set the timeout value to 60 sec, and i got:

Welcome to Poloniex Lending Bot
2017-07-08 22:53:41 Error: <urlopen error timed out> Requesting returnActiveLoans
Timed out, will retry in 60.0sec
Error during summary notification: <urlopen error timed out> Requesting returnActiveLoans
2017-07-08 22:55:42 Error: <urlopen error timed out> Requesting returnActiveLoans
Timed out, will retry in 60.0sec
Error during new loans notification: <urlopen error timed out> Requesting returnActiveLoans
tamaskan commented 7 years ago

try 180 seconds

plusha74 commented 7 years ago

180

Welcome to Poloniex Lending Bot
2017-07-08 23:02:59 Error: <urlopen error [Errno 104] Connection reset by peer> Requesting returnActiveLoans
Caught <urlopen error [Errno 104] Connection reset by peer> Requesting returnActiveLoans from Poloniex, ignoring.
Error during summary notification: <urlopen error timed out> Requesting returnActiveLoans

No connection, status empty, telegram are silent

plusha74 commented 7 years ago

today I used the default settings from default.cfg.example and generated new API key without all of permits.

2017-07-09 05:14:45 Error: <urlopen error timed out> Requesting returnActiveLoans
Timed out, will retry in 60.0sec
2017-07-09 05:16:16 Error: <urlopen error timed out> Requesting returnActiveLoans
Timed out, will retry in 60.0sec
2017-07-09 05:17:49 Error: <urlopen error timed out> Requesting returnActiveLoans
Timed out, will retry in 60.0sec
2017-07-09 05:19:19 Error: <urlopen error timed out> Requesting returnActiveLoans
Timed out, will retry in 60.0sec

Later I'll try to reinstall the bot

nicjb commented 7 years ago

Mine has stopped working too. Please let me know if you find a fix.

tamaskan commented 7 years ago

maybe the ip of pythonanywhere was banned or there is a dns-issue

plusha74 commented 7 years ago

tamaskan, very likely the problem is not with the user. today log: <100 errors (timeout) from 8:00 to 14:00 and 0 any error after 14:00. i just restarted the bot right now and he works without errors + sends telegram notifications. Any timeout errors are now missing.

CrossyFTW, Is your problem solved?

nicjb commented 7 years ago

Sort of. I get the following when I try to run it via Pythonanywhere:

2017-07-09 23:04:52 Error: HTTP Error 502: Bad Gateway Requesting returnActiveLoans.  Poloniex reports: ''
Caught HTTP Error 502: Bad Gateway Requesting returnActiveLoans.  Poloniex reports: '' from Poloniex, ignoring.

But still seems to be semi-functional aside from that. Hasn't placed a loan yet, but rates are low (ie: below thresholds).

nicjb commented 7 years ago

Errors seem to have stopped. Huzzah.

I didn't do anything.

nicjb commented 7 years ago

Error is now intermittent, but bot seems functional.

rnevet commented 7 years ago

The bot fails and then retries later. i.e. if you only see these errors from time to time this doesn't mean the bot won't manage to place orders.

Just making sure, you updated the 'timeout' in config, right? mine btw is ~90sec.

nicjb commented 7 years ago

Yeah I suspected as much. Thanks for your work on this, btw!