MAXCHANNELCOUNT error

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
jonathang
Hero Member
Hero Member
Posts: 32
Joined: 02 Nov 2015, 19:07

MAXCHANNELCOUNT error

Post by jonathang »

Dear Support Team,

We are running an OPC UA Server using Unified Automation .NET Server SDK version 2.5.8 (.NET Framework 4.7.1) and ran into an error occurring in various circumstances.

The error is:
MAXCHANNELCOUNT: Connection rejected because the maximum number of channels.
We usually have about 70-90 unique clients. One of the clients was a Siemens OPC UA Client for WinCC that was causing problems but they are no longer connected.
Since they disconnected, we have not had the MAXCHANNELCOUNT error and everything was running fine.

Today, we were upgrading a separate system on our IT infrastructure that caused the OPC UA Server to be disconnected from the backend that feeds it data. This is something we have done many times without problems.

During the upgrade, all OPC UA Clients were disconnected and we could not connect with UaExpert due to a BadCommunicationError.
The application log for the OPC UA Server has not unusual errors but the SDK log file was filled with MAXCHANNELCOUNT errors.

We tried to restart the OPC UA Server Windows Service but it could not be stopped. We had to restart the entire OS in order to get the OPC UA Server back up and running. Once it restarted, there were no more issues or errors.

Besides the MAXCHANNELCOUNT errors, hundreds of the following errors were found in the SDK log file:
TCPSERVERCHANNEL ForceChannelFault Socket=00000DAC, ChannelId=38, TokenId=65, Reason=[BadTcpInternalError]BeginReceive failed. BeginReceive failed. An established connection was aborted by the software in your host machine

TCPSERVERCHANNEL SOCKET ATTACHED: 00002664, ChannelId=38357

Channel 38344 cleaned up automatically.

Channel 39724 no longer exists.
Could something in the IT infrastructure or another application on the same OS be causing this error?
Should the MaxChannelCount be increased in the application configuration file as below? Could this cause problems?

Code: Select all

 
<Extension>
    <TransportSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd">
        <MaxChannelCount>500</MaxChannelCount>
    </TransportSettings>
</Extension>
We have a separate ticket, unified #10545, with your technical support concerning similar but not identical issues with SDK 2.6.0.


Sincerely,

Jonathan

jonathang
Hero Member
Hero Member
Posts: 32
Joined: 02 Nov 2015, 19:07

Re: MAXCHANNELCOUNT error

Post by jonathang »

Dear Support Team,

I am not sure if this is related to the MAXCHANNELCOUNT error, but we are experiencing a strange issue when connected with UaExpert (1.5.0 319)
Randomly, after running for hours or days, UaExpert gets disconnected from the OPC UA Server and on reconnect, the UserIdentity.IsAdministrator is set to false where it was true before. Manual disconnect and reconnect fixes the issue.

I noticed that the SDK log is full of "MAXCHANNELCOUNT: Connection rejected because the maximum number of channels." errors but the application log only has the new login with no disconnect or SessionActivated being triggered.

UaExpert log:
14:29:36.444 | Server Node | Production | Connection status of server 'Production' changed to 'ConnectionErrorApiReconnect'.
14:29:39.653 | Server Node | Production | Error 'BadCommunicationError' was returned during OpenSecureChannel
14:29:44.791 | Server Node | Production | Error 'BadCommunicationError' was returned during OpenSecureChannel
14:29:49.936 | Server Node | Production | Error 'BadCommunicationError' was returned during OpenSecureChannel
14:29:55.078 | Server Node | Production | Error 'BadCommunicationError' was returned during OpenSecureChannel
14:30:00.638 | Server Node | Production | Connection status of server 'Production' changed to 'Connected'.
Could this be caused by the MAXCHANNELCOUNT error?
Why does the UserIdentity.IsAdministrator get cleared?


Sincerely,

Jonathan

jonathang
Hero Member
Hero Member
Posts: 32
Joined: 02 Nov 2015, 19:07

Re: MAXCHANNELCOUNT error

Post by jonathang »

The problem has been solved by increasing the MaxChannelCount in the configuration file. This value is independent of the MaxSessionCount which each session usually having one channel.


Sincerely,

Jonathan

Post Reply