Closed ghost closed 6 years ago
It looks like Poloniex is fiddling with API call throttling. We've seen this before and things returned to normal after a while. Nevertheless, here are steps you can follow when this specific error is seen:
Make sure you don't have other scripts running towards the same Poloniex account or any other linked accounts. Linked accounts share the API limit. Any API use will contribute to the limit, even if it's from a different IP address or using a different API key.
Update poloLender Pro config parameters maxApiCallsPerDuration
and apiCallsDurationMS
(default values are maxApiCallsPerDuration = 8
and apiCallsDurationMS = 1000
, which means max 8 API calls every 1000 milliseconds). You can try decreasing maxApiCallsPerDuration
(e.g. to a value between 7 and 4) and/or increasing apiCallsDurationMS (e.g. to a value between 1100 and 3000).
Note: config parameters are stored in
config.json
file when running the bot locally or on mongodb database when running on Heroku (look for mlab add-on)
So I still have the same issue even when dropping down the API Calls to 4:
"maxApiCallsPerDuration": 4,
"apiCallsDurationMS": 1500,
"advancedSettings": {
"parallelApiExecution": false,
"nonceDelay": 500,
"muteNonceErrors": false
},
It starts off fine, but after the initial loan offer/ taken/canceled section on startup, it starts to send API limit errors.
I also am seeing consistent crashes every day or so while running the code on an AWS node:
Killed
npm ERR! code ELIFECYCLE
npm ERR! errno 137
npm ERR! poloLenderPro@1.3.3 start: `node -r babel-register app.js`
npm ERR! Exit status 137
npm ERR!
npm ERR! Failed at the poloLenderPro@1.3.3 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /../../../_logs/2017-10-02T21_12_30_011Z-debug.log
Will look into adding some debug info to display the api call numbers.
The crashes seem to happen due to out of memory. When browser is open, output lines are being added to the logtrail and eventually the system runs out of memory. I will implement discarding older logtrail messages in the next revision; in the meantime, as a workaround, keep your browser closed when not needed for longer periods or time.
Both good revisions. I actually am running the deployment mostly headless on an ec2, and it is sending telegram messages via api, which might be the cause. I only have used the browser for initial setup on the newer version.
Please use v1.3.4 and set the environment variable DEBUG=pololender
to get the API call debug log.
It indicates the time and number of API calls per second, which can help in troubleshooting and/or reporting the issue to Poloniex.
Pretty consistently with the latest version, it seems that the API limits of Poloniex are getting hit.
2017-09-18 15:25:12 - notice: returnActiveLoans: Poloniex error 429: Too Many Requests. Please do not make more than 8 API calls per second.
2017-09-18 15:25:13 - notice: returnActiveLoans: Poloniex error 429: Too Many Requests. Please do not make more than 8 API calls per second.
2017-09-18 15:25:14 - notice: returnActiveLoans: Poloniex error 429: Too Many Requests. Please do not make more than 8 API calls per second.
2017-09-18 15:25:14 - notice: returnActiveLoans: Poloniex error 429: Too Many Requests. Please do not make more than 8 API calls per second.
2017-09-18 15:25:15 - notice: returnActiveLoans: Poloniex error 429: Too Many Requests. Please do not make more than 8 API calls per second.
2017-09-18 15:25:16 - notice: returnActiveLoans: Poloniex error 429: Too Many Requests. Please do not make more than 8 API calls per second.
2017-09-18 15:25:16 - notice: returnActiveLoans: Poloniex error 429: Too Many Requests. Please do not make more than 8 API calls per second.
2017-09-18 15:25:17 - notice: returnActiveLoans: Poloniex error 429: Too Many Requests. Please do not make more than 8 API calls per second.
2017-09-18 15:25:17 - notice: returnActiveLoans: Poloniex error 429: Too Many Requests. Please do not make more than 8 API calls per second.
2017-09-18 15:25:18 - notice: returnActiveLoans: Poloniex error 429: Too Many Requests. Please do not make more than 8 API calls per second.
May need to limit the API calls down to prevent this behavior.