/go/maxkeepaliverequests sets Apache's MaxKeepAliveRequests directive in the main Apache configuration file. This is the number of requests Apache serves on one persistent (keep-alive) connection before it closes the connection. The command: Higher values let browsers reuse a connection for more files, which speeds up page loads but keeps worker processes busy longer. 0 means unlimited. The setting only matters when KeepAlive is on (see keepalive). Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# Set the default (100 requests per connection)
/go/maxkeepaliverequests
The web server is reloaded automatically.
Options
This command has no working options. It takes one optional argument.
| Argument | Required | Default | Notes |
|---|---|---|---|
<number> |
No | 100 |
A whole number of requests. 0 means unlimited. Nothing checks the value (see Validation). |
return |
No | — | Prints the current value instead of setting one. |
--noreload |
No | — | Does not work. The reload always runs. See The reload. |
Examples
# Use the default of 100
/go/maxkeepaliverequests
# Allow 500 requests per connection
/go/maxkeepaliverequests 500
# No limit
/go/maxkeepaliverequests 0
# Show the current value
/go/maxkeepaliverequests return
Output
| Outcome | What you get |
|---|---|
| Value set | MaxKeepAliveRequests updated successfully., followed by whatever reload prints. |
return |
The value from the first matching line. Blank if there is none. |
| Unsupported operating system | Unknown operating system. Nothing is changed. |
The success message is printed even if the file could not be changed, so it does not prove the change was made. Check with return.
Every run is also recorded in /var/log/go/maxkeepaliverequests.log.
[!NOTE]
returnends with exit status1, andreturndoes not reload the web server. In scripts, read the output instead of relying on the exit status.
See the full reference at /go/maxkeepaliverequests and the GoAdmio command index.
GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.
