Skip to content

HistoryRead fails with "Could not encode outgoing message" when returning large number of DataValues (e.g. 100k) #669

@sudhakar269

Description

@sudhakar269

Type of issue

  • Bug
  • Enhancement
  • Compliance
  • Question
  • Help wanted

Current Behavior

When using Quickstarts.HistoricalAccessServer, and performing a HistoryReadRawModified call that returns ~100,000 DataValue entries, the client fails with the following error:
Opc.Ua.ServiceResultException: Could not encode outgoing message.
at Opc.Ua.ClientBase.ValidateResponse(ResponseHeader header)
at Opc.Ua.SessionClient.HistoryRead(RequestHeader requestHeader, ExtensionObject historyReadDetails, TimestampsToReturn timestampsToReturn, Boolean releaseContinuationPoints, HistoryReadValueIdCollection nodesToRead, HistoryReadResultCollection& results, DiagnosticInfoCollection& diagnosticInfos)
at Opc.Ua.SessionClientBatched.HistoryRead(RequestHeader requestHeader, ExtensionObject historyReadDetails, TimestampsToReturn timestampsToReturn, Boolean releaseContinuationPoints, HistoryReadValueIdCollection nodesToRead, HistoryReadResultCollection& results, DiagnosticInfoCollection& diagnosticInfos)

The server-side RawRead handler successfully returns the data, but the OPC UA core library fails during response encoding.

Is this expected? or any way we can get data reducing load

Observed Behavior:

Server executes successfully and returns data.

OPC UA stack fails to encode the outgoing message due to message size or buffer limits.

Expected Behavior

No response

Steps To Reproduce

https://github.com/OPCFoundation/UA-.NETStandard-Samples/tree/master/Workshop/HistoricalAccess/Server

Here in this repo code change was done to return bulk data when HistoryReadRawModified method invoked, looping the same data multiple times and returning

Environment

- OS:Windows
- Environment:Visualstudio
- Runtime:
- Nuget Version:latest
- Component:
- Server:
- Client:

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions