Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control node 'restart' vs full deploy ? #391

Open
bonjour81 opened this issue Sep 17, 2024 · 4 comments
Open

Control node 'restart' vs full deploy ? #391

bonjour81 opened this issue Sep 17, 2024 · 4 comments

Comments

@bonjour81
Copy link

Hello,

Not really an issue, but a need for clarification (I was not sure where to post this).

1/ I have well noticed that 'full deploy' is recommended and I had trouble already when I did not (bot does not answer anymore to my commands, sometimes only after a few hours).

But I though that if I don't touch any telegram node, a more simple deploy may be good enough.
Does this make sense or is it recommended to full deploy whatever I did in my flows, even if modifications does not touch any telegram node ?

2/ What is the purpose of control node 'restart' command ?
Does it cleanly re-init telegram node same as full deploy ?
if so, a simple inject node to restart telegrambot at each deploy would do the job. what do you think ?

@windkh
Copy link
Owner

windkh commented Sep 17, 2024

@bonjour81
the difference between partial and full deploy is that in full deploy the configuration nodes are completely recreated while in partial deploy the nodes only disconnect and reconnect to the configuration node.
This was always a problem for the following reason:
the configuration node contains logic for polling the messages from telegram server. The loop is inside a library underneath. It does not really support proper restarting. The only thing I can do is recreate an instance of the bot and start from scratch in full deploy. (which is the safest)

The control node was implemented due to these problems. You can detect of the polling loop runs or if it stalled using this node. Restart should stop and destroy the underlying instance and then it should create a new one. A restart of the control node can not recreate the config node from scratch (that can only be done by node red) but it does similar things with the telegram polling loop: it just kills it and recreates it.

--> you can try to restart your bot every few hours with the control node if you discover problems. However the bots I run here are completely stable and for that reason it would be helpful to find out what is wrong with your setup (maybe instable internet connection ...?)

@bonjour81
Copy link
Author

Hi !
Thank you for your feedback,
Well, let me explain:

  • telegrambot was running for monthes or weeks very stable, no problem, very stable.
    I had the feeling it was even robust to non-full deploy as long as I don't touch telegrambot nodes.

  • Recently I started working in some other stuff in my flows, and I often use non-full deploy for tests (because it's faster than full deplou).

  • I also updated my telegrambot to last version (I'm not sure which version I was using before, maybe 12.0)

  • now It happpen sometimes that telegram bot receiver is stalled.

  • it might be due to update to last version but more propable is that I perform many non-full deploy and forget to perform full deploy when I finish my daily work.

Considering I often forget, and that stall happen some hours after my work in flows, I was thinking that this restart function may do the job for me :)

What's the best way to detect is telegrambot is stalled ? Maybe this "msg.payload.isOnline" from control node ?

@windkh
Copy link
Owner

windkh commented Sep 29, 2024

@bonjour81 I will adapt the control node so that an output is triggered as soon as the bot is offline

@bonjour81
Copy link
Author

That would be cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants