Lifetime count
LifetimeCount is the number of publishing intervals a subscription may go without receiving a Publish request before the server deletes it. The server enforces that it is at least three times MaxKeepAliveCount. With a 1000 ms publishing interval and a lifetime count of 60, a client has one minute of silence before its subscription is gone.
The arithmetic
Tolerated silence equals RevisedLifetimeCount multiplied by RevisedPublishingInterval. Both are revised values, and the server will raise the lifetime count if you request one below three times MaxKeepAliveCount. Compute the product after CreateSubscription returns, log it, and check it against the reconnect budget you actually need - not against the numbers you requested.
What expiry looks like
The subscription is deleted server-side. Subsequent Publish or modify calls for it return BadSubscriptionIdInvalid or BadNoSubscription, and a client that had another live subscription may receive a StatusChangeNotification announcing the timeout. Nothing about the session or channel is wrong - which is why the failure is so often misdiagnosed as a network problem.
Size it against your outage, not your comfort
The lifetime is the window in which TransferSubscriptions can still succeed. If your worst realistic outage is a 45-second switch failover and your lifetime works out at 20 seconds, every failover costs you a full subscription rebuild across the fleet. Setting a longer lifetime is cheap on the server compared with what rebuilding costs it.
Example
Lifetime in milliseconds, from counts and cycles
PublishingInterval MaxKeepAliveCount LifetimeCount tolerated silence
1000 ms 10 30 30 s (minimum allowed: 3 x 10)
1000 ms 10 60 60 s
100 ms 10 60 6 s <- same counts, ten times shorter
5000 ms 6 60 300 s
Changing the publishing interval changes the lifetime, because it is counted in cycles.
Defined in: Part 4 - Services, CreateSubscription: RequestedLifetimeCount, RevisedLifetimeCount and the relationship to MaxKeepAliveCount.
Last verified 7 September 2026 against OPC UA 1.05.07. OPC UA Connect is an educational resource and is not affiliated with the OPC Foundation.