Python code stops automatically on Ec2
Hi, I am running a python code which uses API from a broker platform for a trading strategy. The code runs for hours on personal machine but when I run from an EC2 instance it stops automatically in 2-4 hours without any error. this has happened 3 times now. i saw some 54 updates to be applied on the ubuntu instance, have upgraded all and rebooted the system. Even then issue remains. pls help
I don't think it's possible to answer the question given the information available. if the code is running fine and stops without error then it is exiting normally. You'll need to add some debugging and logging to determine what is happening.
Hi Brettski, thanks for the response. the code is in while True as it keeps on running till the markets are closed which will 12 midnight India. I do have the complete logs and it keeps on writing to a log file. The log shows the code output but doesnt show any error. abruptly the code and screen stops on AWS. If i see cloudWatch metrics theres highs on NetworkIn. can it be cause of I am writing continuously on a file and AWS doesn't give me that space. i am on t2.large instance. i checked syslog and kernel log etc but there are no errors
I'm not a career software developer but it sounds iike there is some component that you're using which is exiting without error. If it were me, I'd be enabling more logging and debug output to try and determine where the interruption is happening.
using lambda as the identity broker to access AWS ConsoleAWS-User-6470475asked a month ago
Deploying a Machine Learning Project with django and laravel as a backend.RazaibAWSasked 7 days ago
How to keep a process running on my EC2 instance via cloud9ineedhelpbadlyasked 3 years ago
Python code stops automatically on Ec2AWS-User-9836463asked 10 days ago
How to setup cloud9 python autocomplete?haiasked a month ago
Location header lost from Python responsePierre-Basked 2 years ago
Failed when run code deployAWS-User-7456032asked 24 days ago
Component with bash script and python code - how to package/deployAWS-User-9962534asked 9 months ago
Botocore not able to use credentials on EC2 instancesurculusasked a year ago
Code running slow on Sagemaker notebook instance for the first time it runsvbsrinivasanasked 2 years ago