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

Restarting a process is not working on some termination conditions. #190

Closed
offbyone opened this issue Nov 25, 2024 · 2 comments
Closed

Comments

@offbyone
Copy link
Contributor

offbyone commented Nov 25, 2024

Overmind: v2.5.1
OS: macOS Sequoia 15.1.1

I have a Procfile with a command that connects to a GitHub codespace for port forwarding:

port-forward: gh cs --codespace $(script/get-codespace-id) ports forward 80:3080 3035:3035
ngrok: ...

I have configured that service to be allowed to die and to restart:

OVERMIND_CAN_DIE=port-forward,shell,console
OVERMIND_AUTO_RESTART=port-forward,shell,console

When I have a network interruption, though, the process dies, and is not restarted:

$ overmind status
PROCESS            PID       STATUS
port-forward       12497     dead
ngrok              84235     running

Connecting to the port-forward process shows this:

Forwarding ports: remote 3035 <=> local 3035
Forwarding ports: remote 80 <=> local 3080
error connecting to tunnel: connect to forwarded port failed: error connecting to forwarded port: failed to open streaming channel: failed to open port forward channel: failed to open channel: read tcp 192.168.5.148:64831->20.69.79.91:443: read: can't assign requested address

... and that's it. It doesn't restart, which is what I expect given the configuration.

@DarthSim
Copy link
Owner

Hey @offbyone!

You should not use OVERMIND_CAN_DIE in this situation.

Processes in the OVERMIND_CAN_DIE list can die without any consequences. Their termination won't cause the termination of the rest of the processes, nor will Overmind restart them.

OVERMIND_AUTO_RESTART == "if it dies, try to revive it"
OVERMIND_CAN_DIE == "if it dies, let it be dead"

@offbyone
Copy link
Contributor Author

TIL! Thanks!

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