Hi support team
I am currently testing historyReadRawModified() in my UA Client by the V1.5.6 C++ SDK.
But I only got BadTcpMessageTooLarge when set like following
1)HistoryReadRawModifiedContext.numValuesPerNode = 2000
2)Period is set to be 30Hours
3)UaHistoryReadValueIds is set to 1000 nodes.
My server is also a V1.5.2 C++ SDK server with
5)only support TCP with a connection of SecurityPolicy = None
6)MaxMessageSize = 16777216 and MaxAlloc = 16777216 in ServerConfig.xml
7)have 3000 data per node in 30Hours
Why BadTcpMessageTooLarge returned ?
Is the MaxMessageSize in server wrong or other reasons ?
Could you give me some advice ?
Thanks a lot
BadTcpMessageTooLarge on historyReadRaw
Moderator: uasdkcpp
- Support Team
- Hero Member
- Posts: 3069
- Joined: 18 Mar 2011, 15:09
Re: BadTcpMessageTooLarge on historyReadRaw
Hello sunny,
BadTcpMessageTooLarge indicates that the response the server is trying to send exceeds the limit configured for the MaxMessageSize.
If you set up 1000 nodes to read and allow 2000 values for each that's 2000000 DataValues where each DataValues contains a StatusCode (4 Byte), at least 1 TimeStamp (8 Byte) and a Value (e.g. for UInt16 values another 3 Bytes - encoding mask plus value).
overall e.g. for UInt16 Values each DataValue has at least 15 Bytes on the network.
So 2M values times 15 Bytes is already more than 30 MBytes where MaxMessageSize is 16MBytes.
You can either reduce the number of items or the number of values per node to solve this issue.
BadTcpMessageTooLarge indicates that the response the server is trying to send exceeds the limit configured for the MaxMessageSize.
If you set up 1000 nodes to read and allow 2000 values for each that's 2000000 DataValues where each DataValues contains a StatusCode (4 Byte), at least 1 TimeStamp (8 Byte) and a Value (e.g. for UInt16 values another 3 Bytes - encoding mask plus value).
overall e.g. for UInt16 Values each DataValue has at least 15 Bytes on the network.
So 2M values times 15 Bytes is already more than 30 MBytes where MaxMessageSize is 16MBytes.
You can either reduce the number of items or the number of values per node to solve this issue.
Best regards
Unified Automation Support Team
Unified Automation Support Team