Python code stops automatically on Ec2

0

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

질문됨 2년 전425회 조회
1개 답변
0

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.

profile pictureAWS
전문가
답변함 2년 전
  • 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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠