Pool draining slowly
Symptom. One pool’s backlog grows while others are fine. Deliveries come in a burst, then stop
for a while (“it ran, then stopped”). The router dashboard lists a message group as draining but
nothing for it is mediating, and its jobs sit QUEUED in the platform. A subscription’s deliveries
always arrive late.
Five causes look alike from outside. Check them in this order: the first two are by far the most common.
1. A subscription delay (by design)
Section titled “1. A subscription delay (by design)”A subscription with delaySeconds holds each job until its not_before. A subscription whose
deliveries are always the same number of minutes late usually has a delay set. Check the
subscription and the job’s not_before before theorising about the router.
2. The pool’s rate limit
Section titled “2. The pool’s rate limit”A pool’s rate limit is a token bucket whose burst is one minute’s worth of messages. A pool limited to 60 per minute delivers up to 60 messages at once after a quiet spell, then one per second; at 6 per minute, a burst of 6, then one every ten seconds.
The wait is hard to see: a message waiting for its token already holds one of the pool’s concurrency
slots, nothing is logged, it is not listed as mediating, and its group reads as draining. The jobs
behind it in its group (and, on an SQS FIFO queue, everything behind it in that message group) stay
QUEUED.
Diagnose.
GET <prefix>/monitoring/pools: the pool showsis_rate_limited: true,active_workersat or nearconcurrency, and nothing inGET <prefix>/monitoring/mediating?poolCode=<pool>.- The dashboard’s Pools table shows a climbing Rate Limited count
(
fc_rate_limit_exceeded_total{pool}in Prometheus). rate_limit_per_minuteon the pool is lower than the traffic it receives.
Fix. Raise the dispatch pool’s rate limit (or remove it) in the console or API; the router picks
up the change from the router-config document (within about a second when the router runs with the
platform, otherwise at its next fetch). For immediate relief,
PUT <prefix>/monitoring/pools/<pool code> with {"rate_limit_per_minute": N} changes the running
router only: messages already waiting keep the reservation they have, and a later configuration
change for the pool replaces the value, so make the lasting change on the pool itself.
If the rate limit exists to protect a consumer, it is doing its job. Talk to the consumer’s owner before raising it.
3. The pool is full and deferring
Section titled “3. The pool is full and deferring”A pool buffers up to max(concurrency × 40, 100) messages. Beyond that the router defers new
messages for the pool back to the broker, booking each a return time spaced at the pool’s measured
pace (at most an hour ahead, FC_ROUTER_DEFERRAL_MAX_DELAY_SECONDS).
Diagnose. queue_size at queue_capacity in /monitoring/pools; the dashboard’s Deferred
column (total_deferred) growing; fc_messages_rejected_total{pool} rising.
What it means. The consumer is slower than the arrival rate. Deferral keeps the other pools on the same queue moving; it does not make this one faster.
Fix. Raise the pool’s concurrency if the consumer can take more parallel work. A deferral already booked is not recalled, so after raising concurrency mid-backlog the pool may idle until the deferred messages come back (at most the deferral horizon). On SQS FIFO, a backlog beyond about 15,000 messages on a queue shared with other pools cannot be worked around from the router; move the work to its own queue or slow the producer. See dispatch pools.
4. A slow or hanging consumer
Section titled “4. A slow or hanging consumer”Each delivery may take up to the attempt timeout. For messages the router delivers itself the contract allows 15 minutes per attempt and up to three attempts, so one hanging target can hold a worker for a long time; ordered groups wait behind it.
Diagnose. oldest_mediating_ms on the pool high (the dashboard turns it amber after a minute and
red when the pool also has no free slot); /monitoring/mediating shows the same target for a long
time; the router raises a pool-capacity warning when a pool has had no free slot for longer than the
attempt timeout.
Fix. Find out from the consumer’s owner why it is slow. Give consumers that are legitimately slow their own pool, with enough concurrency for the groups that must progress at once. Ordered groups are delivered one message at a time, so concurrency helps only across groups.
5. The consumer is failing or pushing back
Section titled “5. The consumer is failing or pushing back”| Sign | Meaning | What happens |
|---|---|---|
A circuit breaker for the target is open (fc_circuit_breaker_open{target}) |
The target failed repeatedly with gateway errors or timeouts | Messages go back to the broker without an attempt until the breaker half-opens |
released message group to broker in the router log |
A 502, 503, 504 or a transport failure |
The whole group goes back to the broker and returns on the broker’s schedule |
target deferred message (ack=false) in the router log |
The consumer answered 2xx with ack: false (or 429), optionally naming when to come back |
The message comes back at that time. Deferrals spend no attempt and are not capped |
message group flushed by target |
The consumer asked the router to drop the rest of a group for a while | Those messages are acknowledged without delivery until the suppression ends; /monitoring/group-flushes lists them and can clear one |
For platform dispatch jobs, the consumer’s own failures are recorded on the job (status, attempts,
last_error) and do not show as router failures; look at the jobs.
About the “blocked groups” view
Section titled “About the “blocked groups” view”<prefix>/monitoring/blocked-groups (the dashboard’s message-groups view) lists every live
message group in every pool, healthy ones included. A group being listed is not a problem. Only a
group that stays idle with a growing “parked for” time, or one with a suppression end time, deserves
attention.