Hi all,
Im trying to write a large string into the value of a memory tag via a golang opcua client.
clientOption = append(clientOption, opcua.MaxMessageSize(33554432))
clientOption = append(clientOption, opcua.SendBufferSize(uint32(50000)))
clientOption = append(clientOption, opcua.ReceiveBufferSize(uint32(50000)))
clientOption = append(clientOption, opcua.MaxChunkCount(0))
opcuaClient, err := opcua.NewClient(serverEndpoint.EndpointURL, clientOption...)
if err != nil {
log.Info().Msg("error creating client: " + err.Error())
return nil, err
}
In the client i set a SendBufferSize parameter as well as a unlimited maxMessageSize. My issue is that whenever trying to write my string, i get this error in the ignition web console logs:
org.eclipse.milo.opcua.stack.core.channel.MessageDecodeException: UaException: status=Bad_TcpMessageTooLarge, message=message size exceeds configured limit: 3141728 > 2097152
at org.eclipse.milo.opcua.stack.core.channel.ChunkDecoder.decode(ChunkDecoder.java:97)
at org.eclipse.milo.opcua.stack.core.channel.ChunkDecoder.decodeSymmetric(ChunkDecoder.java:77)
at org.eclipse.milo.opcua.stack.server.transport.uasc.UascServerSymmetricHandler.lambda$onSecureMessage$1(UascServerSymmetricHandler.java:139)
at org.eclipse.milo.opcua.stack.core.channel.SerializationQueue.lambda$decode$1(SerializationQueue.java:63)
at org.eclipse.milo.opcua.stack.core.util.TaskQueue$TaskWrapper.run(TaskQueue.java:273)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.milo.opcua.stack.core.UaException: message size exceeds configured limit: 3141728 > 2097152
at org.eclipse.milo.opcua.stack.core.channel.ChunkDecoder$AbstractDecoder.decode(ChunkDecoder.java:241)
at org.eclipse.milo.opcua.stack.core.channel.ChunkDecoder.decode(ChunkDecoder.java:89)
... 7 common frames omitted
The UaException indicates a default max message size of 2097152. However when looking at the settings, i see that there is a parameter Max Message Size set to 33554432. I was confused since my string size (3141728 ) is way lower.
i digged a bit further and found out that the ignition opcua server is based on the [this]( milo/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/channel/EncodingLimits.java at cd0f3d97f78de3823541229032642f8af9f00040 · eclipse/milo · GitHub
i can see that the default max message size is : 2 * 1024 *1024 = 2097152
so i was wondering if there was a way to increase this limit since the settings in the web console don't seem to affect this.
Thank you for your help.