Keywords: WordPress + NGINX + SSL - AWS - Technical issue - Other
bnsupport ID: 6b8cd97c-2f8a-214b-80e2-a5aa4860e
Our website has this issue infrequently, but when it happens it's usually after a surge in traffic, but well past the peak of the surge. For example today we had an article which did very well (>1000 people online at the same time), at which time it was highly responsive. When this dropped to about ~500 users the website suddenly started giving 502 errors. Even now at ~60-200 users the site gives 502 errors.
This has happened in the past, it usually just fixes itself. But there's no rhyme or reason, it just randomly starts working later on. It also doesn't always do it after a period of high activity, but it's usually around there.
Upon restarting everything the website will remain pretty usable for between 1/2 seconds and maybe a minute. After which time it goes back to giving 502s. Usually the first 502 takes ages to get to, but after that it's almost instant.
We have tried upgrading the AWS EC2 instance from a t3a.small, to an m5.large, which didn't help.
We have the following error in the nginx config:
<addr> *1378 connect() to unix:/opt/bitnami/php/var/run/www.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: ...
We have tried switching this from the default unix socket implementation to 127.0.0.1 (and switching the php config and nginx config), but it acts exactly the same.
We also have the following error in the php config:
<addr> [11-Mar-2020 19:51:29] WARNING: [pool www] server reached max_children setting (5), consider raising it
We have tried changing max_children to 15, 50, and 500. None of them make any difference, only that the warning occurs infrequently at 50 children, and never at 500.
We have also tried resetting every plugin. This doesn't help much at all.
We have also tried resetting the php opcode cache, which again doesn't help.
I ran the bnsupport-tool and it generated the following reference:
It also asked me to include the nginx errors log, but there's nothing in it really apart from what I mentioned above, but I can supply it if needed.
I don't know how much information the support tool encodes, but our setup is the following:
- The bitnami AWS image
- m5.large instance (usually t3a.small)
- We run the database on an AWS RDS db.t3.micro
- We have a basic vpc setup on AWS so that the database is hidden from the internet, while the EC2 instance accesses it directly via an elastic IP owned by AWS.
- We have htdocs on a separate EBS volume, mounted, then linked to the correct place. It still does it without being setup like this however.
Thank you, please help as we are really lost at what to try next, and it is seriously effecting our site.