A simple cronjobs to restart your apache server when it’s too busy

#!/bin/bash# URL of Apache server-statusSTATUS_URL="http://localhost/server-status?auto"# Get current number of busy workersHTML_STATUS_FILE="/"curl -s "$STATUS_URL" > "$HTML_STATUS_FILE"BUSY_WORKERS=$(cat "$HTML_STATUS_FILE" | grep "BusyWorkers" | awk '{print $2}')# Restart Apache if busy workers exceed...
Continue Reading