mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
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.
This commit is contained in:
1 parent
291a201efa
commit
60c4edda55
1 file changed
+5
@@ -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 ["
|
||||
|
||||
Reference in new issue
Block a user