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

asked 4 years ago211 views
2 Answers
0

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

answered 4 years ago
0

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

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions