Skip to content

armgit / floci

Public Imported from GitHub
0

Light, fluffy, and always free - The AWS Local Emulator alternative

fix(lambda): log actionable hint when concurrency pool is exhausted (#935)

Steve60c4edda5572
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 ["