简体   繁体   中英

Python script running as screen process gets “Killed” on Ubuntu / AWS EC2

I want to have a python script running on my Ubuntu instance constantly. It's an AWS EC2 a1.medium instance and the script is taking pretty much 100% of the CPU constantly.

I start the script with screen <run script> , however it gets killed randomly and I have no idea why. One time I had it running in the foreground and I saw "Killed" as the last output of the process.

I tried running it as root with sudo screen <run script> but I get [screen is terminating] . Not sure if root would even help though.

Is there anything I can do to troubleshoot this? I tried with -L -Logfile <filename> with proper permissions for the file, but it stays empty, so I really have no idea how to tell what went wrong.

What is nature of your script? Is it CPU/Memory bound? I am assuming you are over utilising vCPUs provide in a1.medium EC2 instance

You can also take a look at this to understand steal time

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM