From 60c4edda55723fa5d3fa0c552b5a78d6a19e4ac1 Mon Sep 17 00:00:00 2001 From: Steve <54807886+steve-hb@users.noreply.github.com> Date: Wed, 20 May 2026 01:08:12 +0200 Subject: [PATCH] fix(lambda): log actionable hint when concurrency pool is exhausted (#935) 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 class LambdaConcurrencyLimiter { 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 ["