feat(sessions): add UnattachedSessionGraceSeconds to reap never-subscribed idle sessions
A client that opens a session and vanishes before it ever streams (e.g. OtOpcUa's GalaxyDriver on a failed start) pinned a session slot and a live x86 worker for the full DefaultLeaseSeconds (1800 s), because detach-grace only applies to sessions that once had a subscriber. MxGateway:Sessions:UnattachedSessionGraceSeconds (int, default 0 = off, validated >= 0) makes the existing lease sweep reap a Ready session that has never attached an event subscriber once it has been idle (no unary activity) for the window, with the close reason unattached-grace-expired. Ready-only, idle-from-last-activity and first-subscriber-cancels keep it from catching slow starts or unary-only clients. GatewaySession.ExtendLease had no production callers and did not fit the rule, so it is removed; tests move leases through TouchClientActivity.
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
"DefaultLeaseSeconds": 1800,
|
||||
"LeaseSweepIntervalSeconds": 30,
|
||||
"DetachGraceSeconds": 30,
|
||||
"UnattachedSessionGraceSeconds": 0,
|
||||
"AllowMultipleEventSubscribers": false,
|
||||
"MaxEventSubscribersPerSession": 8
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user