You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(telegram): release stuck ingress claims on timeout instead of dead-lettering
- Reduce ISOLATED_INGRESS_BACKLOG_STALL_MS from 25 min to 5 min so stuck
handlers are detected sooner
- Replace failTelegramSpooledUpdateClaim with releaseTelegramSpooledUpdateClaim
in recoverTimedOutSpooledHandler so the update is requeued (attempts++) and
retried rather than permanently dead-lettered
- Add options.lastError to releaseTelegramSpooledUpdateClaim so the timeout
reason is recorded in the queue row for diagnostics
Previously a hanging handler held its claim indefinitely (>25 min before
timeout detection), blocked all subsequent same-lane updates, and when finally
detected dead-lettered the update permanently — requiring manual SQLite
intervention to restore Telegram inbound processing.
Fixes#95350
constmessage=`Telegram isolated polling spool handler timed out behind update ${handler.updateId} on lane ${handler.laneKey} after ${age}; marking the update failed, aborting active reply work, and restarting isolated ingress so later updates can drain.`;
889
+
constmessage=`Telegram isolated polling spool handler timed out behind update ${handler.updateId} on lane ${handler.laneKey} after ${age}; releasing the claim for retry, aborting active reply work, and restarting isolated ingress so later updates can drain.`;
890
890
activeHandler.timeoutMessage=message;
891
891
try{
892
-
constfailed=awaitfailTelegramSpooledUpdateClaim({
893
-
update: handler.update,
894
-
reason: "handler-timeout",
895
-
message,
892
+
// Release the claim back to pending so the drain loop can retry it,
893
+
// instead of dead-lettering with a permanent failure. The attempts
894
+
// counter on the queue record is incremented on each release, so
895
+
// repeated timeouts are observable via SQLite diagnostics.
0 commit comments