{"action":"created","issue":{"url":"https://api.github.com/repos/askmike/gekko/issues/2040","repository_url":"https://api.github.com/repos/askmike/gekko","labels_url":"https://api.github.com/repos/askmike/gekko/issues/2040/labels{/name}","comments_url":"https://api.github.com/repos/askmike/gekko/issues/2040/comments","events_url":"https://api.github.com/repos/askmike/gekko/issues/2040/events","html_url":"https://github.com/askmike/gekko/issues/2040","id":306845154,"number":2040,"title":"cause of '500 \"Internal Server Error\"' at /api/backtesting","user":{"login":"JasLin","id":147611,"avatar_url":"https://avatars3.githubusercontent.com/u/147611?v=4","gravatar_id":"","url":"https://api.github.com/users/JasLin","html_url":"https://github.com/JasLin","followers_url":"https://api.github.com/users/JasLin/followers","following_url":"https://api.github.com/users/JasLin/following{/other_user}","gists_url":"https://api.github.com/users/JasLin/gists{/gist_id}","starred_url":"https://api.github.com/users/JasLin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasLin/subscriptions","organizations_url":"https://api.github.com/users/JasLin/orgs","repos_url":"https://api.github.com/users/JasLin/repos","events_url":"https://api.github.com/users/JasLin/events{/privacy}","received_events_url":"https://api.github.com/users/JasLin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2018-03-20T12:30:51Z","updated_at":"2018-03-26T11:18:35Z","closed_at":null,"author_association":"NONE","body":"**Note: this is the technical bug tracker, please use other platforms for getting support and starting a (non technical) discussion. See the [getting help page](https://gekko.wizb.it/docs/introduction/getting-help.html) for details.**\r\n\r\n**I'm submitting a ...**\r\n[x] bug report\r\n[ ] question about the decisions made in the repository\r\n\r\n**Action taken** (what you did)\r\n\r\nbacktesting with gekkoga with correctly data range , and surely all data was imported\r\n\r\n**Expected result** (what you hoped would happen)\r\n\r\nfinish the test and give out result \r\n\r\n**Actual result** (unexpected outcome)\r\n\r\n500 \"Internal Server Error\" throw at /api/backtest, and cause gekkoga throw this error too.\r\n\r\n\r\n\r\n**Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc)\r\n\r\n@askmike @generalectric \r\n\r\nI have search all the related issues on gekko & gekkoga, and all the solution not help. \r\n\r\nso after print trace some debug information, i found this issue is cause by the problem of implement of [stream] (https://nodejs.org/api/stream.html#stream_buffering) in [gekko](https://github.com/askmike/gekko/blob/67ae8ab6529c58577046caf32c599a25d5f0d2c5/core/markets/backtest.js#L94)\r\n\r\napi/backtest will randomly stop on this line \r\n```js\r\nthis.push(c);\r\n```\r\nI guess the buffer increase to the [highWaterMark] (https://nodejs.org/api/stream.html#stream_readable_readablehighwatermark) limit of stream buffer. and make it stop with error.\r\n\r\nbecause consumer's process speed is lower then reader push() speed. this stream implementing is little complex , I have no idea how to fix it yet. \r\n\r\n@askmike  in the implement, I saw you use readable.pipe(writeable) to flowing data to gekkostream.  in theory it will automatically handle the read/write consumer speed problem.  it's wired.\r\n\r\nref: [500 error on gekkoga](https://github.com/gekkowarez/gekkoga/issues/30#issuecomment-374574883)"},"comment":{"url":"https://api.github.com/repos/askmike/gekko/issues/comments/376131895","html_url":"https://github.com/askmike/gekko/issues/2040#issuecomment-376131895","issue_url":"https://api.github.com/repos/askmike/gekko/issues/2040","id":376131895,"user":{"login":"askmike","id":969743,"avatar_url":"https://avatars0.githubusercontent.com/u/969743?v=4","gravatar_id":"","url":"https://api.github.com/users/askmike","html_url":"https://github.com/askmike","followers_url":"https://api.github.com/users/askmike/followers","following_url":"https://api.github.com/users/askmike/following{/other_user}","gists_url":"https://api.github.com/users/askmike/gists{/gist_id}","starred_url":"https://api.github.com/users/askmike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/askmike/subscriptions","organizations_url":"https://api.github.com/users/askmike/orgs","repos_url":"https://api.github.com/users/askmike/repos","events_url":"https://api.github.com/users/askmike/events{/privacy}","received_events_url":"https://api.github.com/users/askmike/received_events","type":"User","site_admin":false},"created_at":"2018-03-26T11:18:34Z","updated_at":"2018-03-26T11:18:34Z","author_association":"OWNER","body":"Gekko bundles the candle properties together with your indicator\nparameters, are they configured correctly?\n\nOn Mon, Mar 26, 2018 at 5:58 PM, Jas <notifications@github.com> wrote:\n\n> got more detail from tulip: Invalid options. and print the input option\n> with following code:\n>\n> ...\n>     log.info(basectx.candleProps);\n>     _.each(\n>       this.tulipIndicators,\n>       indicator => indicator.run(\n>         basectx.candleProps,\n>         tulindResultHander.bind(indicator)\n>       )\n>     );\n>   }...\n>\n> here we got the option:\n>\n> 2018-03-26 18:52:53 (INFO):\t{ open: [ 6385.02 ],\n>   high: [ 6398 ],\n>   low: [ 6385.02 ],\n>   close: [ 6398 ],\n>   volume: [ 38.28753715999999 ],\n>   vwp: [ 6393.491076272645 ],\n>   trades: [ 200 ] }\n> 2018-03-26 18:52:53 (ERROR):\tInvalid options\n>\n>  ERROR: TULIP ERROR:\n>\n>\n>   xxx POST /api/backtest 500 263ms -\n>\n>   Error: non-error thrown: Child process has died.\n>\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/askmike/gekko/issues/2040#issuecomment-376127268>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/AA7MD3zUnz6d0DBoootrQlzZXmS233CEks5tiMndgaJpZM4Sxzfm>\n> .\n>\n\n\n\n-- \nPGP key at keybase.io/mikevanrossum\n<https://keybase.io/mikevanrossum/key.asc>\n"}}
{"actor":{"display_login":"askmike"}}