Apache threads and db connections not cleaning up causing ELB high latency

0

Environment:

Elastic Beanstalk
PHP 7.1 running on 64bit Amazon Linux/2.9.0

Drupal 7

Pre-fork MPM
mod_php MaxRequestServers=128
MaxRequestsPerChild= 1000

Drupal page caching off due to personalization/regional customizations.

Elasticache/Redis caching

4- t2.xlarge instances

Classic ELB
ELB timeout 60 /health check timeout 60 with 180 interval

mod_reqtimeout=14-28 body and head.
KeepAlive on

RDS/MySQL timeout and interactive 60 | db.m4.xlarge

CloudFront serving images, css, etc.

Ongoing issues:

Many 408 errors in access logs
Apache processes (MaxRequestServers) maxing out; long running and are not cleaned up
Many DB connections climbing fast with many sleeping processes
No DOS attacks that we are aware of
ELB latency very high
504 client errors
CPU and Memory for DB and Instances within the normal range.
Autoscaling does not help since this is not a resource issue.

NOTE: Enabling the Drupal page caching stabilizes the site but we cannot leverage the sites global/regional features so this is not an option.

Also: Could it be an issue with the underlying hardware or limits/throttle in AWS?

Edited by: awsusr13 on Nov 6, 2019 10:57 AM

已提问 4 年前215 查看次数
2 回答
0

The solution was to increase the size of the Redis instance with more network throughput (m5).

已回答 4 年前
0

The solution was to increase the size of the Redis instance with more network throughput (m5).

已回答 4 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则