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

preguntada hace 2 años425 visualizaciones
1 Respuesta
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
EXPERTO
respondido hace 2 años
  • 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.

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas