server keeps killing background processes

why does my server keep killing processes that have been backgrounded using nohup after closing an ssh session?

2 Replies

I did a bit of research on this for you, because I haven't personally run into this issue. I've found that it does happen, and there are a few reasons why.

I found a page on Stack Exchange that gives a few things you can look into. I'll link it to you here, and summarize below:

Why process(es) are killed with nohup

The article states that there are two possible reasons that these processes are being killed One of them is that in /etc/systemd/logind.conf the following is true:

KillUserProcesses=yes

The second reason is that the process is set up with a SIGHUP setting that overrides nohup, which would cause this to happen if your shell is closed regardless of whether or not you've logged out.

The link I shared above has workarounds given for each of these scenarios and ways of checking to see if either is causing the issue. I hope that it helps you out. If you find something different, please feel free to reply here.

There's also this post on keeping Bash command running after closing an SSH session that has some other options: How do I keep a process running after I disconnect from my Linode?

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct