Hello Support Team,
I tried to test maximal count of sessions with our UA server (built using C++ SDK 1.3.1).
Default in the configuration I have 100. For the test I took UaExpert (10 sessions per client).
After 50 connects, I can connect no more new clients/sessions to the server. Client displays message
"Could not connect to server: BadDisconnect".
When I'm going down in the server configuration to max session count let's say to 10, works as expected, server accepts max allowed count of sessions. The same I see with the UaDemoServer (1.3.1.193). Version of the UaExpert client is 1.2.1 164.
Is it a known problem or do I make something wrong?
Regards,
Aivaras P.
MaxSessionCount
Moderator: uasdkcpp
- Support Team
- Hero Member
- Posts: 3072
- Joined: 18 Mar 2011, 15:09
Re:MaxSessionCount
Hello Aivaras,
There are different settings, some of them configurable during runtime, some only through compiler switches.
The limitation to 50 is introduced by a compiler switch in the UaStack. The compiler switch limits the number of TCP/IP connections per SocketManager to 50. This can be changed by rebuilding the UaStack. The setting is in the stack file opcua_config.h.
But there is also a physical limitation of 64 possible TCP/IP connections per select on Windows. Therefore the maximum setting per SocketManager (UA Endpoint) is 63 (64 minus one for internal use). This is only a limitation for the used socket API on Windows.
It would be possible to configure several endpoints to increase the maximum number of possible TCP/IP connections.
We are working on a solution that one UA Endpoint is using automatically more than one SocketManager if the setting for the maximum number of connections is higher than 60.
The setting of max sessions is the overall count of logical sessions the server allows across all UA Endpoints. This setting can be change in the configuration file of the server.
Best Regards,
Unified Automation Support Team
There are different settings, some of them configurable during runtime, some only through compiler switches.
The limitation to 50 is introduced by a compiler switch in the UaStack. The compiler switch limits the number of TCP/IP connections per SocketManager to 50. This can be changed by rebuilding the UaStack. The setting is in the stack file opcua_config.h.
But there is also a physical limitation of 64 possible TCP/IP connections per select on Windows. Therefore the maximum setting per SocketManager (UA Endpoint) is 63 (64 minus one for internal use). This is only a limitation for the used socket API on Windows.
It would be possible to configure several endpoints to increase the maximum number of possible TCP/IP connections.
We are working on a solution that one UA Endpoint is using automatically more than one SocketManager if the setting for the maximum number of connections is higher than 60.
The setting of max sessions is the overall count of logical sessions the server allows across all UA Endpoints. This setting can be change in the configuration file of the server.
Best Regards,
Unified Automation Support Team
Best regards
Unified Automation Support Team
Unified Automation Support Team
-
- Jr. Member
- Posts: 3
- Joined: 07 Oct 2011, 13:27
Re:MaxSessionCount
Re,
thank you for clearing
Regards,
Aivaras P.
thank you for clearing
Regards,
Aivaras P.
-
- Jr. Member
- Posts: 1
- Joined: 27 Sep 2021, 13:07
Re: MaxSessionCount
Hello Support Team!
Is this limitation of 50 connections also present in current SDK version? Is the Windows TCP / IP connection limitation still available in Windows and Linux?
Best Regards,
Roman
Is this limitation of 50 connections also present in current SDK version? Is the Windows TCP / IP connection limitation still available in Windows and Linux?
Best Regards,
Roman