Proxy 为什么telebot中会发生(';连接中止。';,ConnectionResetError(104,';对等方重置连接';)错误?

Proxy 为什么telebot中会发生(';连接中止。';,ConnectionResetError(104,';对等方重置连接';)错误?,proxy,bots,telegram,telegram-bot,python-telegram-bot,Proxy,Bots,Telegram,Telegram Bot,Python Telegram Bot,我编写了电报机器人,并在美国地区的谷歌引擎上运行它(电报在我的国家被封锁)。大多数情况下,一切正常,但有时机器人开始抛出错误 ('Connection aborted'。,ConnectionResetError(104,'Connection reset by peer')) 他给出了两次这个错误(在两条消息上),第三次他回答得很好。在互联网上,这个问题的答案通常是代理问题。我不使用代理。有没有人遇到过类似的问题?有什么办法可以解决吗 代码非常简单: @bot.message_handler(

我编写了电报机器人,并在美国地区的谷歌引擎上运行它(电报在我的国家被封锁)。大多数情况下,一切正常,但有时机器人开始抛出错误

('Connection aborted'。,ConnectionResetError(104,'Connection reset by peer'))

他给出了两次这个错误(在两条消息上),第三次他回答得很好。在互联网上,这个问题的答案通常是代理问题。我不使用代理。有没有人遇到过类似的问题?有什么办法可以解决吗

代码非常简单:

@bot.message_handler(commands=['check'])
def send_text(message):
    try:
        # Here bot connects to my db and gets info from it
        bot.send_message(message.chat.id, 'some message')
    except Exception as e:
        print(e)
        print("Problem in check function: ", message.chat.id)

if __name__ == '__main__':
    while True:
        try:
            bot.polling(none_stop=True, timeout=30)
        except:
            time.sleep(15)