Amazon Elastic Beanstalk is taking forever to update environment - amazon-web-services

I have battled with deploying my app on elastic beanstalk and rds for over two days now and just when i figured out the issue, elastic beanstalk is taking over 10 hours now still updating environment . I stopped the action earlier on and restart again. It's still running for over 5 hours . This started yesterday.Before it takes roughly 5 min or less to update my environment. The update were trigger after i added my rds host , user and passwords etc.
I am running Instance type: t1.micro , Proxy server: nginx, Node version: 4.4.3.
Please have anyone else encounter this issue before? How do i addressed it ?

I have solved this by Rebuilding the environment, before that I saved my configuration.
Good Luck

Related

AWS Beanstalk rolling old configuration

I have two memcached clusters created (t2.small and t2.micro)
When I updated my EB endpoint pointing to new memcached cluster which is t2.micro. It rolls back to the old cluster configuration which is cache.t2.small. It gives me warning and error message informing about the load balancer.
I have degraded status then went to OK but with the old configuration.
Anyone who had experienced the same issue?
I have tried the second time but is giving me an error.

Amazon EC2 becomes unresponsive when running two Mean pm2 processes

I have an amazon ec2 (t2.micro) instance running. I have 2 Mean applications hosted on it. It was working fine for more than 5 months. But from last two days when more than one pm2 process starts the instance get stopped and I need to restart it again. With one pm2 it is working fine but as I start the second pm2 process it gets stopped (It becomes unresponsive and I can't login into) and again I need to reboot.
It was working fine with 3 to 4 pm2 processes but from last 2 days it is not working as expected.I have checked the CloudWatch Logs but everything is fine there.
I am using Nginx server. I have checked nginx, pm2 and mongodb logs but nothing is wrong there.
Also, I have one Lightsail instance with 1GB memory and 40GB SSD. I have hosted 5 WordPress websites there. It is also having the same issues I need to reboot the instance more than twice a day.
I don't know what is the reason behind that so, asking here for help. Is there any issue with AWS EC2 or Lightsail instances?
This is EC2 CloudWatch graph please check.

Wordpress running on EC2 t3.small becomes unavailable (ELB Error 504) after X amount of time, needs rebooting

I have a problem with my Amazon EC2 instance (that did not happened when I was using DigitalOcean).
I've several EC2 instances that are managed by me. My personal EC2 has about 5 Wordpress sites running on a t2.micro instance and the traffic is not high so it is working well in load speed.
Also I have another 2 instances for one of my clients, one t2.micro (running only one Wordpress site) and a t3a.micro (running 4 Wordpress sites). The issue is with all 3 instances (mine and all the 2 of my client).
I have a CloudWatch alarm to notify me by email when Error 504 happen. Since I get the alarm, the website becomes unavailable (Cloudflare shows me Error 504), but I can get into SSH or Webmin. I do service nginx status and all seems to be fine, same to service php7.2-fpm. I do pkill nginx && pkill php* and then service nginx start && service php7.2-fpm start correctly but when I try to enter to the site, the Error 504 is still there.
To test, I decided to install and configure Apache with and without PHP-FPM enabled, same problem. Instance going well and websites running fast but after X amount of hours, it becomes unaccessible via web and the only solution is rebooting...
What's the only thing that solve the issue? Well, rebooting the instance.... After it boots, the websites are available again. Please note that I moved from DigitalOcean to AWS because it is more useful but I can't understand why the problem is happening here and not there since I've a similar instance configured very similar...
In all of the instances I've a setup with:
OS: Ubuntu 18.04
Types: Two t2.micro and one t3a.micro
ELB: Enabled
Security Groups: only allow ports 80, 443 from all the sources.
Database: In a RDS, not on the same instance.
I can provide the logs of everything that you probably can ask but I review all the Nginx and PHP-fpm logs and I can't see any anomalies. Also with syslog and kern.log, but I can provide if it can helps.
Hope you can give me a hand. Thanks for your advice!
EDIT:
I already found the origin of the issue. The problem wasn't in the EC2, all my headache was because I have the RDS set with only one Security Group attached to allow access from my IP to remote management of the databases and the public IPs of the EC2 that runs Wordpress, but I figured that I also need to whitelist the private IPs of those EC2s... Really noob mistake but that was the solution.

Elastic Beanstalk URL cannot access Website after successful environment update

I am hosting a Django site on Elastic Beanstalk. I haven't yet linked it to a custom domain and used to access it through the Beanstalk environment domain name like this: http://mysite-dev.eu-central-1.elasticbeanstalk.com/
Today I did some stress tests on the site which led it to spin up several new EC2 instances. Shortly afterwards I deployed a new version to the beanstalk environment via my local command line while 3 instances were still running in parallel. The update failed due to timeout. Once the environment had terminated all but one instance I tried the deployment again. This time it worked. But since then I cannot access the site through the EB environment domain name anymore. I alway get a "took too long to respond" error.
I can access it through my ec2 instance's IP address as well as through my load balancer's DNS. The beanstalk environment is healthy and the logs are not showing any errors. The beanstalk environment's domain is also part of my allowed hosts setting in Django. So my first assumption was that there is something wrong in the security group settings.
Since the load balancer is getting through it seems that the issue is with the Beanstalk environment's domain. As I understand the beanstalk domain name points to the load balancer which then redirects to the instances? So could it be that the environment update in combination with new instances spinning up has somehow corrupted the connection? If yes, how do I fix this and if no what else could be the cause?
Being a developer and newbie to cloud hosting my understanding is fairly limited in this respect. My issue seems to be similar to this one Elastic Beanstalk URL root not working - EC2 Elastic IP and Elastic IP Public DNS working
, but hasn't helped me further
Many Thanks!
Update: After one day everything is back to normal. The environment URL works as previously as if the dependencies had recovered overnight.
Obviously a server can experience downtime, but since the site worked fine when accessing the ec2 instance ip and the load balancer dns directly, I am still a bit puzzled about what's going on here.
If anyone has an explanantion for this behaviour, I'd love to hear it.
Otherwise, for those experiencing similar issues after a botched update: Before tearing out your hair in desperation, try just leaving the patient alone overnight and let the AWS ecosystem work its magic.

Python app uses old filed on EC2 instance

I have an interesting problem:
There is an EC2 instance, on which py3env is stored
I deploy my web app from pyCharm to EC2 and run the server (runserver 0.0.0.0)
Since last week the web app uses OLD files, which I have already deleted from EC2. I check app files on EC2 - they are correct, but still I have 'old' app running.
Maybe there is some EC2 cache problem or what?
There is nice documentation about your question.