Telegram Bots Sometimes HangssteemCreated with Sketch.

in #witness-category3 years ago

Telegram Bots - Tron sometimes hangs (got stucked) - this happens like once every few months.

I was able to get the error this time:

image.png

I was trying to restart it automatically - however, it doesn't work as expected.
I also set a hourly restart crontab job - but also didn't work as expected.

TODO

  1. add a test to get notification when bot is stucked.
  2. investigate how to restart a bot automatically when it is stucked.
  3. investigate why it got stuck and avoid this happens in the first place.

Steem to the Moon🚀!

  • You can swap the STEEM/SBD to Tether USDT (TRC-20) via steem2usdt!
  • You can swap the STEEM/SBD to TRX (TRON) via steem2trx!
  • You can swap the STEEM/SBD to BTS (BitShares) via steem2bts!
  • Register a free STEEM account at SteemYY!
Sort:  

!test !thumbup

Hello @justyy! You are Glorious!


command: !thumbup is powered by witness @justyy and his contributions are: SteemYY.com
More Commands are coming!

!ask how to solve telegram-bot hangs sometimes?



There are a few solutions you can try if your Telegram bot is hanging:
1. Check your code for any potential deadlocks and try to debug and fix those.
2. Increase the API call timeout in your bot settings so that it has enough time to process all requests.
3. Make sure that the server where the bot is hosted is fast enough to handle the incoming requests without delay.
4. Try using a different messaging platform, such as Slack or Discord, if possible.
5. Monitor the logs of your Telegram bot for any errors or unexpected behavior that could be causing it to hang.
6. Reach out to Telegram’s support team if all else fails – they might be able to pinpoint what’s causing the issue and provide necessary assistance.


command: !ask is powered by witness @justyy and his contributions are: SteemYY.com
More Commands are coming!. !ask is currently based on ChatGPT-3.5