I am trying to start a background job in elastic beanstalk, the background job has an infinite loop so it never returns a response and so I receive this error:" Some instances have not responded to commands.Responses were not received from [i-ba5fb2f7]."
I am starting the background job in the elastic beanstalk .config file like this: 06_start_workers: command: "./workers.py &"
Is there any way to do this? I don't want elastic beanstalk to wait for a return value of that process ..
You can run background tasks in build environments. To do this, in your buildspec, use the nohup command to run a command as a task in the background, even if the build process exits the shell. Use the disown command to forcibly stop a running background task.
Elastic Beanstalk isn't great if you need a lot of environment variables. The simple reason is that Elastic Beanstalk has a hard limit of 4KB to store all key-value pairs. The environment had accumulated 74 environment variables — a few of them had exceedingly verbose names.
Elastic Beanstalk is a service for deploying and scaling web applications and services. Upload your code and Elastic Beanstalk automatically handles the deployment—from capacity provisioning, load balancing, and auto scaling to application health monitoring.
Elastic Beanstalk uses core AWS services such as Amazon Elastic Compute Cloud (EC2), Amazon Elastic Container Service (ECS), AWS Auto Scaling, and Elastic Load Balancing (ELB) to easily support applications that need to scale to serve millions of users.
fixed it, just needed to write this command instead:
command: "nohup ./workers.py > foo.out 2> foo.err < /dev/null &"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With