Skip to content

Commit

Permalink
Merge pull request #40486 from cescoffier/log-503-on-exhaustion
Browse files Browse the repository at this point in the history
  • Loading branch information
cescoffier authored May 7, 2024
2 parents 62c591f + e58595b commit 4331897
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ public void accept(Throwable throwable) {
}

if (event.failure() instanceof RejectedExecutionException) {
// No more worker threads - return a 503
log.warn(
"Worker thread pool exhaustion, no more worker threads available - returning a `503 - SERVICE UNAVAILABLE` response.");
event.response().setStatusCode(HttpResponseStatus.SERVICE_UNAVAILABLE.code()).end();
return;
}
Expand Down

0 comments on commit 4331897

Please sign in to comment.