SC311 means the service accepted new work after readiness was withdrawn and
while an older request was still draining. That new work may be cut off when
the process exits.
| Code | SC311 FAIL |
|---|---|
| Stage | Draining traffic |
| CLI exit code | 1 |
| What it means | A new request sent after readiness was withdrawn got a normal response instead of being rejected. |
| Message |
|
| First thing to check | Reject new work during shutdown with a status in rejectStatuses (503 by default), or stop accepting connections. |
How should the service reject new work?
Choose one behavior:
- Keep listening during a short drain window and return
503for new work. - Close the listener and allow the connection to be refused.
Then make newRequests.rejectStatuses and
newRequests.allowConnectionRefused match that choice.
{
"shutdown": {
"readinessWithdrawal": true,
"newRequests": {
"path": "/test/new-work",
"rejectStatuses": [503],
"allowConnectionRefused": true
}
}
}A timeout is not a rejection. The service must return a configured status or clearly refuse the connection.
How do I verify the fix?
The timeline should show new request rejected — HTTP 503 or a refused
connection after readiness withdrawn and before the original request
finishes.
Keep the rejection route safe and representative. A special route that always
returns 503 can make the test pass without proving that real new work is
blocked.