Skip to main content

Connection Settings

Learning Focus

By the end of this lesson you will know how to tune connection timeouts, keep-alive behavior, and maximum concurrent connections for your traffic patterns.

Key Connection Settings

SettingDefaultWhat It Controls
Max Connections10000Total concurrent connections allowed
Max SSL Connections10000Concurrent HTTPS connections
Connection Timeout300sHow long an idle connection stays open
Keep-Alive Timeout5sHow long to keep a connection alive between requests
Max Keep-Alive Requests10000Requests per persistent connection

Tuning Guidelines

Server ProfileKeep-Alive TimeoutMax ConnectionsRationale
Small VPS (1-2 GB RAM)5-15s2000-5000Conserve memory and file descriptors
Medium server (4-8 GB)15-30s10000Balance responsiveness and resources
High traffic (16+ GB)30-60s20000+Maximize client reuse

Configuring in WebAdmin

  1. Navigate to Server ConfigurationTuningConnection
  2. Adjust settings based on your server profile
  3. Save and Graceful Restart
# Monitor current connection count
netstat -an | grep -c ESTABLISHED

# Check file descriptor limits (connections require FDs)
ulimit -n
cat /proc/sys/fs/file-max
info

Connection settings trade off between keeping clients happy (longer keep-alive) and protecting server resources (shorter timeouts). Measure before tuning.

Key Takeaways

  • Keep-alive settings balance responsiveness against resource usage.
  • Start with conservative defaults and increase based on measured traffic.
  • Monitor connection counts to detect when limits are being reached.

What's Next