Closed qwpto closed 1 year ago
I think the discord posts were rate limited at some point, in case it occurs repeatedly it's possible to get banned at the CloudFlare level. https://discord.com/developers/docs/topics/rate-limits So it would be good to also rate limit and perhaps use the retry after response to slow things down in cases like this.
I appriciate the report but in case you got this error on the GUI dashboard, it would be way more helpful if you reported it via the "report" button. That way I get to see useful debuging detail such as installed versions, the full Jesse logs, plus raw exchange logs. Never the strategy of course.
I need to know the routes in this session, whether or not the "local candle generation" was enabled.
Yeah I just saw from the other feedback that this button existed, however I had shut them down immediately when I got home. Hopefully the log above contains the info needed.
You can see in there it did indeed exceed the discord rate limit:
[INFO | 2022-09-16T18:56:45] Discord ERROR [429]: {
"global": false,
"message": "The resource is being rate limited.",
"retry_after": 3208
}
Yeah I just saw from the other feedback that this button existed, however I had shut them down immediately when I got home. Hopefully the log above contains the info needed.
You can see in there it did indeed exceed the discord rate limit:
[INFO | 2022-09-16T18:56:45] Discord ERROR [429]: { "global": false, "message": "The resource is being rate limited.", "retry_after": 3208 }
I suggest using Telegram instead which has higher limits.
One every 2 seconds is probably ok though, at that point it really is spamming.
You can see at the end of the log I need to account for the ban in the JesseReportDiscord addon, since this crashes at the moment under this scenario. I'll make that update.
Ok, that's now fixed in version 1.2.1 of the JesseReportDiscord package. Also added timouts so it doesn't wait forever.
I have 64GB of DDR5 memory, but there was a webpage that had run out of memory. When I saw the stats though the load was low (less than 50% consumption). It's happened again today interestingly. Same error. Ran fine at 1min for 5 hours though.
Actually that's interesting, it recovered in a way:
[INFO | 2022-09-17T16:33:00] Executing ... then this error for 17 mins, then
[INFO | 2022-09-17T16:50:00] Executing ... [INFO | 2022-09-17T16:50:22] Error fetching candles via REST for ATOM-USDT from Binance Perpetual Futures. No worries, will try later. Error: "HTTPSConnectionPool(host='fapi.binance.com', port=443): Max retries exceeded with url: /fapi/v1/klines?interval=1m&symbol=ATOMUSDT&startTime=1663432741000&endTime=1663492681000&limit=1000 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001894F784D60>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))" [INFO | 2022-09-17T16:50:50] Error fetching candles via REST for ATOM-USDT from Binance Perpetual Futures. No worries, will try later. Error: "HTTPSConnectionPool(host='fapi.binance.com', port=443): Max retries exceeded with url: /fapi/v1/klines?interval=1m&symbol=ATOMUSDT&startTime=1663432769000&endTime=1663492709000&limit=1000 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001894F7876A0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))" [INFO | 2022-09-17T16:51:00] Executing ... [INFO | 2022-09-17T16:51:18] Error fetching candles via REST for ATOM-USDT from Binance Perpetual Futures. No worries, will try later. Error: "HTTPSConnectionPool(host='fapi.binance.com', port=443): Max retries exceeded with url: /fapi/v1/klines?interval=1m&symbol=ATOMUSDT&startTime=1663432797000&endTime=1663492737000&limit=1000 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001894F787BE0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))" [INFO | 2022-09-17T16:51:46] Error fetching candles via REST for ATOM-USDT from Binance Perpetual Futures. No worries, will try later. Error: "HTTPSConnectionPool(host='fapi.binance.com', port=443): Max retries exceeded with url: /fapi/v1/klines?interval=1m&symbol=ATOMUSDT&startTime=1663432825000&endTime=1663492765000&limit=1000 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001894F784130>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))" [INFO | 2022-09-17T16:52:00] Executing ...
which continued like that with it working and then not for a bit until [INFO | 2022-09-17T17:03:58] Then it went into this reported error again
and eventually back into this oscillation of errors fetching candles and running.
Ok, have just seen the documentation update: https://jesse.trade/help/faq/can-i-run-multiple-instances-of-jesse-at-the-same-time My instances here were running native and sharing the same redis and postgres databases, using different coins, but perhaps that has caused an issue.
I looked at the logs again. It's like all the candle fetching requests are failing and the store stays empty. Seems like a connection issue.
Also it's weird that the log value related to "local candle generation" is absent in your logs. Did you remove it? Is the debug mode enabled (the value for that is absent as well).
Thanks @saleh-mir, It should have been with this config:
Thank you. I will close this for now then.
Has been running with with multiple instances using a redis and postsgres for each for 2 days, the candle error with the exchange occured and did not cause a problem like before. So it seems this was the issue.
Describe the bug
To Reproduce live trading on Binance Perpetual Futures 2022/09/16 18:52 that led to the following message simultaneously in multiple instances (BTC-USDT, and ETH-USDT) being raised to the discord channels at 30x per minute each, until I got home to stop it around 21:00 UTC
Expected behavior Single error message, then recovery preferably without interruption otherwise restarting the strategy, or perhaps stopping.
Screenshots N/A
Enviroment (please complete the following information):
Additional context System had been running for 3 days on a 1min timeframe. Previously, same setup had been running for 2 weeks.