Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

When running a sim no HTML report or finishing statement happens. Seems to hang after a while #2315

Open
miqueet opened this issue Aug 6, 2020 · 10 comments
Labels

Comments

@miqueet
Copy link

miqueet commented Aug 6, 2020

KINDLY READ AND ACT ON THE BELOW INFORMATION BEFORE FILING YOUR ISSUE!

Please go to our Zenbot subreddit for questions, help and support:

https://www.reddit.com/r/zenbot/

If you open a GitHub issue, here is our policy:

  1. It must be a bug or a feature request.
  2. The form below must be filled out.

Here's why we have that policy: Zenbot developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals and rarely leads to bugfixes or useful enhancements. GitHub also notifies hundreds of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Reddit.


Remove everything above before creating your issue.

System information

  • Have I written custom code (as opposed to using zenbot vanilla): no

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04

  • Zenbot version (commit ref, or version): 4.1.0

  • Zenbot branch: unstable

  • NodeJS version:v10.22.0

  • Python version (when using a python script): python -V
    Python 3.7.2

  • Exact command to reproduce (include everything): ./zenbot.sh sim binance.ETH-BTC --strategy trend_ema --days 10 --period=10m

I seem to be having this issue with ANY sim though

  • Did I make any changes to conf-sample.js?: only configuring the exchange api key

Describe the problem

The sim runs and just appears to halt. After a period of time it just quits. (this time I ran the same command above with no --days argument)

2020-07-29 06:29:59 0.0291140 ETH-BTC +0.21% 8086 66.73 +++ 0.0465 0.0275 bought 25961.43450473 ETH 216.7372020-07-29 06:39:59 0.0292050 ETH-BTC +0.31% 8394 71.80 +++ 0.0663 0.0283 bought 25961.43450473 ETH 216.7372020-07-29 06:49:58 0.0291980 ETH-BTC -0.03% 8221 70.90 +++ 0.0595 0.0283 bought 25961.43450473 ETH 216.7372020-07-29 06:59:59 0.0290770 ETH-BTC -0.42% 7203 57.55 ++ 0.0242 0.0271 bought 25961.43450473 ETH 216.7372020-07-29 07:09:59 0.0290280 ETH-BTC -0.17% 4358 53.18 + 0.0098 0.0235 bought 25961.43450473 ETH 216.7372020-07-29 07:19:59 0.0290890 ETH-BTC +0.21% 3155 57.51 ++ 0.0247 0.0208 bought 25961.43450473 ETH 216.7372020-07-29 07:29:59 0.0290850 ETH-BTC -0.02% 2759 57.13 ++ 0.0218 0.0141 bought 25961.43450473 ETH 216.7372020-07-29 07:39:59 0.0291010 ETH-BTC +0.05% 2616 58.30 ++ 0.0243 0.0144 bought 25961.43450473 ETH 216.7372020-07-29 07:49:59 0.0290920 ETH-BTC -0.04% 1781 57.36 ++ 0.0202 0.0145 bought 25961.43450473 ETH 216.7372020-07-29 07:59:59 0.0291500 ETH-BTC +0.19% 2659 61.66 ++ 0.0335 0.0150 bought 25961.43450473 ETH 216.7372020-07-29 08:09:59 0.0292880 ETH-BTC +0.47% 8904 69.54 +++ 0.0662 0.0150 bought 25961.43450473 ETH 216.73717580 BTC -0.25% +7.11%

Source code / Error logs

I unfortunately do not know how to turn on additional logging unfortunately and there is no stack trace printed.

I ran with --debug on the end and it appears to end up in the same place with no additional logging printed.

992779 BTC +12.07% -3.24%
2020-08-02 14:50:00 - preparing buy order over 12434.38668366 ETH of 413.754 BTC (40%) tradeable balance with a expected fee of 0.413754 BTC (0.1%)

loss protection: refusing to buy at 0.0332750 BTC, buy loss of +7.89%
2020-08-02 14:59:58 0.0331360 ETH-BTC -0.42% 6619 56.88 ++ 0.0471 0.0327 sold 0.00000000 ETH 1035.412020-08-02 15:09:59 0.0331890 ETH-BTC +0.15% 3983 58.47 ++ 0.0555 0.0355 sold 0.00000000 ETH 1035.412020-08-02 15:19:56 0.0331640 ETH-BTC -0.08% 4327 57.40 ++ 0.0458 0.0346 sold 0.00000000 ETH 1035.412020-08-02 15:29:59 0.0333390 ETH-BTC +0.52% 3848 62.58 ++ 0.0817 0.0360 sold 0.00000000 ETH 1035.412020-08-02 15:39:59 0.0333120 ETH-BTC -0.09% 3402 61.34 ++ 0.0695 0.0394 sold 0.00000000 ETH 1035.412020-08-02 15:49:59 0.0332820 ETH-BTC -0.10% 3100 59.92 ++ 0.0576 0.0399 sold 0.00000000 ETH 1035.412020-08-02 15:59:59 0.0332230 ETH-BTC -0.18% 4664 57.12 ++ 0.0400 0.0394 sold 0.00000000 ETH 1035.412020-08-02 16:09:58 0.0333210 ETH-BTC +0.29% 4530 60.43 ++ 0.0590 0.0389 sold 0.00000000 ETH 1035.412020-08-02 16:19:59 0.0333800 ETH-BTC +0.17% 4135 62.31 ++ 0.0678 0.0375 sold 0.00000000 ETH 1035.412020-08-02 16:29:59 0.0335660 ETH-BTC +0.55% 8088 67.56 +++ 0.1044 0.0334 sold 0.00000000 ETH 1035.412020-08-02 16:39:59 0.0337280 ETH-BTC +0.48% 9490 71.30 +++ 0.1327 0.0301 sold 0.00000000 ETH 1035.412020-08-02 16:49:59 0.0338520 ETH-BTC +0.36% 10103 73.80 +++ 0.1504 0.0296 sold 0.00000000 ETH 1035.41992779 BTC +12.07% -4.89%

@miqueet
Copy link
Author

miqueet commented Aug 6, 2020

I ran on my other computer with a different kernel and different nodejs version and received the following error.

(node:3013) UnhandledPromiseRejectionWarning: MongoNetworkError: connection 1 to localhost:27017 timed out
at Socket. (/root/project/zenbot/node_modules/mongodb-core/lib/connection/connection.js:259:7)
at Object.onceWrapper (events.js:286:20)
at Socket.emit (events.js:198:13)
at Socket._onTimeout (net.js:442:8)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
(node:3013) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3013) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@miqueet
Copy link
Author

miqueet commented Aug 11, 2020

@DeviaVir not sure why all my specs are above. But when i replace sim.js with the following version of sim.js it seems to work all the way through.

https://github.com/DeviaVir/zenbot/blob/660f1844b7df2a9cc586e57a580cb2e90cf43a3e/commands/sim.js

@baladithyab
Copy link

I have a similar problem but I have no output and the process exits after a while...

@baladithyab
Copy link

@Wheaties466 changing the node version to lts/erbium worked for me. The simulation no longer hangs. I used nvm to install node so I just needed to execute 'nvm install lts/erbiuim' and im then at v12

@miqueet
Copy link
Author

miqueet commented Aug 16, 2020 via email

@sergioldr
Copy link

Same problem on windows with node 12. I tried with docker and without using it. Di you solved? @Wheaties466

@miqueet
Copy link
Author

miqueet commented Sep 13, 2020 via email

@dlasher
Copy link

dlasher commented Oct 2, 2020

Same fix worked for me here too: #2412

EDIT: It's not really "fixed" - something is still broken, sim runs will "hang" for 30/60/90/longer at the end, doing.. Something?? And quite a few runs in the backtester just fail.

@stale
Copy link

stale bot commented Dec 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Dec 4, 2020
@dlasher
Copy link

dlasher commented Dec 5, 2020

It's still borked. Hope it gets fixed soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants