From 4e7d2e274f6338eb075c5e272a5548b9167650c7 Mon Sep 17 00:00:00 2001 From: Stve Hb Date: Tue, 19 May 2026 13:34:50 +0200 Subject: [PATCH] fix(lambda): log actionable hint when concurrency pool is exhausted When PutFunctionConcurrency hits the regional reservation cap, the LimitExceededException response is AWS-correct but the cause is invisible in floci logs. Operators see only terraform retrying for minutes (AWS SDK Go v2 plus the provider's MaxAttempts=25) while the underlying reason (total reservations exceed regionLimit minus unreservedMin) sits silently in the limiter. Emit a WARN on every limit hit with the offending numbers and the env var to raise the cap. Error code, body and status remain identical to real AWS; this is observability only. --- .../floci/services/lambda/LambdaConcurrencyLimiter.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/io/github/hectorvent/floci/services/lambda/LambdaConcurrencyLimiter.java b/src/main/java/io/github/hectorvent/floci/services/lambda/LambdaConcurrencyLimiter.java index 63d9809c7b..b8ecd1fdca 100644 --- a/src/main/java/io/github/hectorvent/floci/services/lambda/LambdaConcurrencyLimiter.java +++ b/src/main/java/io/github/hectorvent/floci/services/lambda/LambdaConcurrencyLimiter.java @@ -183,6 +183,11 @@ public Integer validateAndSetReserved(String functionArn, int target) { int otherReserved = regionTotal(region).get() - currentForThis; int maxAllowed = regionLimit - unreservedMin - otherReserved; if (target > maxAllowed) { + LOG.warnv("Region {0} reservation pool exhausted: requested={1}, " + + "alreadyReserved={2}, regionLimit={3}, unreservedMin={4}. " + + "Raise FLOCI_SERVICES_LAMBDA_REGION_CONCURRENCY_LIMIT (e.g. 10000) " + + "or lower the function's ReservedConcurrentExecutions.", + region, target, otherReserved, regionLimit, unreservedMin); throw new AwsException("LimitExceededException", "Specified ReservedConcurrentExecutions for function decreases account's " + "UnreservedConcurrentExecution below its minimum value of ["