Skip to content

Commit

Permalink
shinesolutions/aem-helloworld-publish-dispatcher shinesolutions#15
Browse files Browse the repository at this point in the history
* CPU usage in the dispatchers was too high and instances keep terminating before scale-up
Fix: Turn on keep-alives to reduce CPU utilization and improve response time. With keep-alives on, the load balancer doesn't need to establish a new TCP connection for every HTTP request.
KeepAlive is not set to On to fix the CPU usage problem.

* ALB terminates the connections after 60 seconds. so apache configuration should be higher than it.
Fix: When the keep-alive option is enabled, choose a longer keep-alive timeout than the load balancer idle timeout.
keep-alive time out is not set to 65. which is 5 seconds longer than default ALB timeout.

* Maximum number of keep-alive requests was low, so the queue will be full and and connection will time out with 5xx error
Fix: This option sets how many requests a single TCP connection serves when keep-alive is on. For optimal usage of resources, set the maximum number of keep-alive requests to 100 or higher.
This value is now set to 0 which means there wont be any limitation in number of keep-alive connections.
  • Loading branch information
hans-zand committed Jun 22, 2021
1 parent c9801e6 commit 7a7eb8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
### Changed
- Changed Apache keep alive configurations

## 0.11.1 - 2019-05-16
### Changed
Expand Down
6 changes: 3 additions & 3 deletions apache-conf-templates/httpd.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ ServerName "<%= $facts[fqdn] %>"
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 120
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
KeepAlive On
MaxKeepAliveRequests 0
KeepAliveTimeout 65
LimitRequestFieldSize 8190


Expand Down

0 comments on commit 7a7eb8f

Please sign in to comment.