Hey everyone.
I'm having some issues with a local agent in linux AWS-EC2.
I've started it using
prefect agent start -q 'queue_name' &
(observe the '&' indicator to run it in background), but once I close my remote terminal the agent is killed. If I keep my terminal open the agent don't die.
Is it a current bug, am I doing something wrong or is it the normal behavior?
Thanks!
β 1
c
Cole Murray
09/09/2022, 7:54 PM
Hello Esdras,
This is normal behavior for linux. This occurs because the user you used to create the process still owns it, and upon disconnection the OS will kill the backgrounded process.
There is two ways to resolve this, depending on if you need access to the process later:
a) no access needed - Type βdisownβ after backgrounding the task
b) access needed - Use screen/tmux
π 2
c
Christopher Boyd
09/09/2022, 8:34 PM
are you trying to run this in the foreground or as a daemon service ? If you want to run it as a daemon , you can configure it as a service in systemd
Thanks @Christopher Boyd and @Nate, systemd worked the way that I was looking for! (Windows user here! π )
@Cole Murray the screen workaround worked as well!
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.