Method: Apache::Performance#activate_keepalive
- Defined in:
- lib/apache/performance.rb
#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 |