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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南