Service Restart
1012 Service Restart is sent when a server is restarting for a non-error reason – planned restart, deployment, or maintenance. Clients receiving 1012 should reconnect with a short delay. Unlike 1001 (going away without restart), 1012 specifically signals a temporary unavailability due to restart.
Description
1012 allows servers to signal a clean restart to connected clients. Well-behaved clients implement a brief pause (3–10 seconds) before reconnecting to give the server time to restart. This code is used in graceful shutdown sequences: drain connections, send 1012 to all active clients, restart, come back up. Rolling deployments use 1012 to notify clients on old instances to reconnect (possibly to a new instance).
Common Causes
- –Planned server restart or deployment
- –Rolling deployment draining old instances
- –Configuration reload requiring restart
Code
1012
RFC
RFC 6455
Sent By
Server
Retry
Yes