conor19w / Binance-Futures-Trading-Bot

A Technical Analysis Bot that trades leveraged USDT futures markets on Binance.
512 stars 173 forks source link

Connection aborted issue on azure app service #55

Open pavanchowdaryg opened 9 months ago

pavanchowdaryg commented 9 months ago

I have deployed this bot on Azure app service it is showing a connection aborted issue can you please help, I have tried with render cloud hosting also same issue comming

pavanchowdaryg commented 9 months ago

This is the error i am getting WARNING: get_all_open_trades() - Error occurred: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

conor19w commented 9 months ago

That's a binance error, what region is the bot deployed in? Could be connectivity error either if the machine you're running on is not able to handle all of the data flowing through it and also make new calls. Need more info

pavanchowdaryg commented 9 months ago

I am trying with Indian region, i have tried with other regions also and i have tried with different RAM levels also

pavanchowdaryg commented 9 months ago

how can we deploy this code on the server is there any possibility of running it through the azure server?

pavanchowdaryg commented 9 months ago

28-09-2023 12:37:08 DEBUG: Error Percent is 0.0007722945318529853 with a buffer of 170 candles 28-09-2023 12:37:08 DEBUG: Error Percent is 0.0014199771146879976 with a buffer of 171 candles 28-09-2023 12:37:09 DEBUG: Error Percent is 2.714246867764043e-06 with a buffer of 172 candles 28-09-2023 12:37:09 INFO: convert_buffer_to_string() - required buffer calculated is 2 days ago 28-09-2023 12:37:09 INFO: combine_data() - Combining Historical and web socket data... 28-09-2023 12:37:09 INFO: combine_data() - (1/1) Gathering and combining data for ETHUSDT... 28-09-2023 12:37:09 ERROR: get_historical() - Error occurred for symbol: ETHUSDT, Error Info: (ConnectionError(ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))), 'Helper.py', 239), Error: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) 28-09-2023 12:37:09 WARNING: combine_data() - Error occurred adding data, Error Info: (IndexError('pop from empty list'), 'Helper.py', 206), Error: pop from empty list 28-09-2023 12:37:09 INFO: combine_data() - Finished Combining data for all symbols, Searching for trades now... 28-09-2023 12:37:10 DEBUG: < TEXT '{"e":"continuous_kline","E":1695904629987,"ps":...380228.60081","B":"0"}}' [320 bytes] 28-09-2023 12:37:10 DEBUG: ! failing connection with code 1006 28-09-2023 12:37:10 DEBUG: = connection is CLOSING 28-09-2023 12:37:10 DEBUG: > CLOSE 1000 (OK) [2 bytes] 28-09-2023 12:37:10 DEBUG: ! timed out waiting for TCP close 28-09-2023 12:37:10 DEBUG: x closing TCP connection 28-09-2023 12:37:10 DEBUG: ! timed out waiting for TCP close 28-09-2023 12:37:10 DEBUG: x aborting TCP connection 28-09-2023 12:37:10 DEBUG: = connection is CLOSED

conor19w commented 9 months ago

Have you got the latest code installed? I see an error related to empty lists there which I think I addressed in a previous push

pavanchowdaryg commented 9 months ago

yes i have updated with latest one I am getting same error, I have seen on google and I have added requests[security] now I am getting SSL error 28-09-2023 13:23:54 WARNING: get_all_open_trades() - Error occurred: HTTPSConnectionPool(host='fapi.binance.com', port=443): Max retries exceeded with url: /fapi/v2/positionRisk?timestamp=1695907434755&signature=..... (Caused by SSLError(SSLError(1, '[SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2536)'))) 28-09-2023 13:23:55 ERROR: get_historical() - Error occurred for symbol: ETHUSDT, Error Info: (ChunkedEncodingError(ProtocolError("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))), 'Helper.py', 176), Error: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read)) 28-09-2023 13:23:55 WARNING: combine_data() - Error occurred adding data, Error Info: (IndexError('pop from empty list'), 'Helper.py', 143), Error: pop from empty list 28-09-2023 13:23:55 INFO: combine_data() - Finished Combining data for all symbols, Searching for trades now...

alkhachatryan commented 4 months ago

any news?