Just a few questions to help us troubleshoot this problem.
- What kind of process do you run? Is it IO/CPU intensive?
- What type of instance do you use and what OS?
- If you do not close terminal and browser does process run with no interruption even after some time?
- Approximately after what period of time process stops?
- The process uses about 1% of the CPU.
- I use a t2.micro instance which uses Amazon Linux.
- Yes, with the terminal and browser open, I have not experienced any interruptions in the process. I've had the browser open for up to 8 hours, and it works smoothly the whole time.
- I'm not sure exactly how long. My best guess is within a few hours at most.
By the way, apparently I can only make one post per day, so if you ask more questions I will not be able to respond for another 24 hours.
Edited by: ineedhelpbadly on Aug 14, 2019 8:15 AM
Thanks for details!
One more questions: when you close your IDE and then after some time returns to it, does your EC2 instance stops and starts again? Or is it running? You can see that instance was stopped if on loading screen for Cloud9 you will see that Cloud9 attempts to starts EC2 instance.
The EC2 instance continues to run. I can also SSH into my instance at any time and it is always running. by SSH-ing directly into the instance and running the script with
nohup python script-name.py &
, I can now get the script to run for about 24 hours before it stops running.
Hi, can you please explain what your script is doing or, if possible, add python script to this thread.
Here are a few things I would recommend to help debug..
1. launch to see stdout/stderr output - nohup python script-name.py > /tmp/nohup.out& 2. If you don't have try/except/finally blocks around the code, add them to help debug and handle any unexpected exceptions (if an exception is causing it to die) 3. Is it possible your script is running out of resources and dying? For example, maybe "Too many open files" because your script is not closing file handles? (ulimit -n shows 4,096 max files in cloud9 by default). 4. Does your python script just run in a loop performing things every X minutes? If yes, maybe consider creating a scheduled cron job that just runs the script every X minutes. 5. If your python script is running as a "server" accepting connections, can you run it as a daemon? 6. Try launching your python script on a regular EC2 instance to see if you can reproduce the problem there.
Can I SSH into my container running on AppRunner?asked 6 months ago
cloud9 preview running application on specific portasked 6 months ago
Cloud9 constantly 'reconnecting...'asked 2 months ago
What should I do to keep my website server on even though my computer is off?Accepted Answerasked a month ago
How can I copy/clone an entire AWS Cloud9 environment?Accepted Answerasked 9 months ago
Keep the python script aliveAccepted Answerasked 9 months ago
Where did my brand-new Cloud9 environment go? There are none listed for my users.Accepted Answerasked 3 months ago
How to keep a process running on my EC2 instance via cloud9asked 3 years ago
Mounting EFS volume on every Cloud9 EC2 instanceasked 2 months ago
cloud9 environment not visibleasked 3 years ago