Module: Apache::Performance
- Included in:
- Config
- Defined in:
- lib/apache/performance.rb
Overview
Options to adjust server performance beyond MPM settings
Instance Method Summary collapse
-
#activate_keepalive(options) ⇒ Object
Activate KeepAlive, optionally tweaking max requests and timeout.
Instance Method Details
#activate_keepalive(options) ⇒ Object
Activate KeepAlive, optionally tweaking max requests and timeout
activate_keepalive :requests => 100, :timeout => 5 #=>
KeepAlive on
MaxKeepAliveRequests 100
KeepAliveTimeout 5
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/apache/performance.rb', line 10 def activate_keepalive() self << "KeepAlive On" .each do |option, value| case option when :requests self << "MaxKeepAliveRequests #{value}" when :timeout self << "KeepAliveTimeout #{value}" end end end |