3

We have Elastic Beanstalk set to load balancing. When our app is consuming 100% CPU for longer time (i.e. after some downtime when we receive tons of webhooks) then the load balancer restarts docker inside the instance. Our app starts aprox. 2 minutes therefore you can never recover from downtime.

Is there any way how to extend this restart period or even disable it?

Scaling using CPU threshold is not an option for us as our app consumes lots of CPU during higher load.

kuceram
  • 3,795
  • 9
  • 34
  • 54

2 Answers2

1

This seems like a case of failed health check

You can go to your EC2 Dashboad => Load Balancers

Check the Load Balancer that target your EB, under the Health Check tab, you should see and edit the thresold of failed ping request to your instance until it is considered unhealthy and terminated

More information on health checks here and here

qkhanhpro
  • 4,371
  • 2
  • 33
  • 45
  • Thanks for your respond. I went through your links and it seems that the never ending restarts of the application were done by ELB as the ELB health check was failing. I didn't find in the AWS documentation however if the docker with application is restarted when /health check fails. Increase of the instance actually solved my problem. – kuceram Mar 28 '18 at 13:22
1

Increasing of an instance from small to medium actually solved my problem. It seems that the app could not handle this amount of load with limited resources of small instance type.

kuceram
  • 3,795
  • 9
  • 34
  • 54