Glossary · Subscriptions

Overflow bit

When a MonitoredItem queue overflows, the server sets an InfoBit inside the surviving DataValue's StatusCode rather than returning an error. The code bits still evaluate to Good, so the loss is invisible to any client that only checks for Bad. Queue overflow in OPC UA is silent data loss by design, and must be instrumented.

Where the bit lives

A StatusCode is a 32-bit value split into code bits and flag bits: the high half carries the severity and the numeric code, the low half carries info type and info bits. The overflow indication is in the low half, so masking the value against 0xFFFF0000 to evaluate severity - which is exactly what stacks do - yields Good. OPC Publisher documents the combination it sees as 1152, 0x480: the DataValue info type plus the overflow flag.

Why this catches people

Every layer downstream of the client - historian, MQTT bridge, database, dashboard - typically stores or checks the severity, not the info bits. A subscription can drop 90 percent of its samples for months while every quality column in the historian reads Good. The gap only surfaces when someone compares a counter against production reality, or notices a trend that is suspiciously smooth.

How to instrument it

In your notification handler, test the info bits on every DataValue and increment a per-item counter when the overflow flag is set. Expose that counter as an ordinary metric next to your notification rate. The target is zero: raise QueueSize, slow the sampling interval, or apply a deadband until it stays there. Treat any non-zero value as a configuration defect, not a warning.

Example

Reading the two halves of a StatusCode

StatusCode is 32 bits:
  code bits   value & 0xFFFF0000    severity + numeric code   -> evaluates to Good
  flag bits   value & 0x0000FFFF    info type + info bits     -> carries the overflow flag

OPC Publisher documents the overflow case it observes as 1152 (0x480):
  DataValue info type set, plus the overflow flag - with the code bits still Good.

Client logic that works:
   if (statusCode has DataValue info type and overflow flag) overflowCounter[item]++;
Client logic that misses it entirely:
   if (StatusCode.IsBad(statusCode)) ...
The mistake people make: Concluding that data is complete because every status is Good. Good with the overflow bit set means exactly the opposite: the server had more to tell you and threw it away. Any project that samples faster than it publishes must check this bit before it trusts a single trend.

Defined in: Part 4 - Services for queue overflow handling; Part 6 - Mappings for the StatusCode bit layout including info bits.

Status codes you will meet

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.

Free download
OPC UA Server Acceptance Test Pack
A 40-check acceptance test you run against a vendor's server before commissioning sign-off. Weighted scoring, three hard gates, and a one-page verdict for the supplier meeting.
Get the free test pack →
Free, no course, no login