Close connections and improve uptime stats.