Categories
amazon-ec2 amazon-web-services mysql spring-boot

Java application stops running after some time in Amazon AWS

I’ve an EC2 instance in AWS. The instance is in free trial for a year. I’ve deployed a java spring-boot application there. My database is in mysql. This is a light-weight application which doesn’t require heavy resource and the APIs served are really simple.

But the problem is the application stops running suddenly without showing any error messages in its application log. I’ve added a logback which shows nothing.

So when I understand the server application has stopped running from the front end application. I immediately check my aws console and found the host is running fine, but the application in it has stopped. Then I had to run the application again using screen -S myapp java -jar myapp.jar and it runs again smoothly.

So how frequent the application stops running? I couldn’t measure it. Sometimes it stops after running for two-three days. Sometimes after a week – it doesn’t making any sense really.

The APIs served from the application are not frequently used actually. So is there any chance that the application in stopped forcefully by the aws host? Is there anything else that might be the reason for stopping the application without any error log?

Thanks in advance.