Tuesday, May 14, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 23141  / 2 Years ago, thu, august 4, 2022, 9:40:24

Is there anyway to prevent a process from being killed no matter what? I know about nice but I'm not sure if giving a task such as a long running memory-intensive rake task the highest priority will prevent it from being killed off:



nice -n -20 rake xyz


Edit: The original poster most likely wants it to be high priority even if the server is low on resources as well, so much so that other processes get killed first.


More From » process

 Answers
4

Why would it be killed off?



Because it's not automatic that something is killed. Once you answer that, and explain why something would be selected for destruction, you might be able to come up with a solution.



Given you're talking about Rails' rake command, I'm guessing that this is a process running on a server. That you're worried about it being killed suggests it's being killed by the server host for using too many resources. In cases like this, there aren't (nor should there be) ways of stopping your process for being killed.



If you have a resource-expensive task, buy more resources. Use your own server time. Or come to an arrangement with the host that allows you to run it on their dime.


[#28572] Saturday, August 6, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
vigorousom

Total Points: 394
Total Questions: 96
Total Answers: 110

Location: Pitcairn Islands
Member since Fri, Oct 15, 2021
3 Years ago
;