Why the Bulk Read Times Out
Building one DAItemDescriptor per OPC variable and passing the resulting array to ReadMultipleItemValues is correct in principle. The reported startup operation contains more than 900 items, however, and a large request can exceed the client's default read-item timeout of 60 seconds.
A timeout result does not, by itself, identify an invalid item descriptor. First determine whether the complete bulk operation needs more than the configured timeout. The evidence does not specify server limits, network timing, or a maximum supported item count, so do not assume a fixed safe batch size.
Increase the Read-Item Timeout
If startup can wait for the complete result set, increase Timeouts.ReadItem. The setting uses milliseconds; the following evidence-supported configuration changes the timeout to five minutes.
client_.InstanceParameters.Timeouts.ReadItem = 5 * 60 * 1000;
| Configuration | Timeout | Operational effect |
|---|---|---|
| Default | 60 seconds | The request can report timeout exceptions when the bulk read runs longer. |
5 * 60 * 1000 |
5 minutes | Allows more time for the complete bulk read to return. |
Split the Request When Earlier Results Matter
Chunking is the alternative when the interface benefits from receiving part of the parameter set sooner. Keep chunks substantial: the recommendation is to read as many items as practical in one operation and avoid very small batches. One large request maximizes the number read in one go but makes the application wait for the entire request; multiple chunks expose completed subsets earlier.
- Run the existing bulk read with a longer
ReadItemtimeout and record whether all item results return without timeout exceptions. - If waiting for the complete set is unsuitable, divide the descriptor list into several non-small chunks and call
ReadMultipleItemValuesonce per chunk. - Scan every returned result after each call. Confirm that all requested descriptors produced results and that timeout exceptions no longer occur.
Keep Startup Writes Separate
The source states that startup may also write parameters when a compilation variable is set, but it provides no write method, timeout, ordering rule, or verification behavior. Treat the bulk-read correction independently: verify the complete read first, then validate the write path using its documented client settings rather than applying the read timeout to it by assumption.
FAQ
Why do more than 900 OPC variables return timeout exceptions?
The bulk read can take longer than the default 60-second read-item timeout. Increase Timeouts.ReadItem or divide the descriptor list into several substantial chunks.
How do I set the OPC read timeout to five minutes?
Set client_.InstanceParameters.Timeouts.ReadItem = 5 * 60 * 1000;. The supplied value is expressed in milliseconds.
Should I read all OPC items at once or in chunks?
Read as many items as practical in one operation when the application can wait for the complete result set. Use several non-small chunks when receiving partial results sooner is more important.