From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 128 in LabVIEW TCP connection

Hi all,

 

I'm using TCP/IP for communication between a server and over 1000 clients.

I'm facing a weird issue when more than 1000 clients connect to the server. The server side has a TCP listener which waits for the clients. As soon as the number of clients exceeds 1000, the Wait on Listener.vi returns error 128 (Open connection limit exceeded). And after this point even if I close the clients, the listener keep returning that error. It fixes only when I close the listener and create it again.

As a refernece I will say, that the clients are LabVEW VIs which are running on 3 different computers (400 clients on each), and the listener part runs on another separate computer. I have tried to distribute the clients among several ports, however it did not help.

 

Is there a way that LabVIEW limits the number of TCP connections, or what is the limit in general? 

0 Kudos
Message 1 of 11
(9,781 Views)

Hi,

 

 

What subnet address are you using? You've mentioned redistributing clients on several ports, what specific ranges have you used?

 

Regards,

 

Finch Train

0 Kudos
Message 2 of 11
(9,733 Views)

Hi FinchTrain,

The subnet address for all clients is the same 255.255.255.0.

The ports used are from 6338 - 6341. Although, the mentioned problem exists even when I use one port for all clients.

0 Kudos
Message 3 of 11
(9,726 Views)

I have not been able to find that error code in the LabVIEW error documentation, so I do not think this is specific to LabVIEW. It looks like the subnet 255.255.255.0 only allows 254 hosts per subnet.

 

https://technet.microsoft.com/en-us/library/cc958834.aspx

Maggie M.
Application Engineer
National Instruments.
http://www.ni.com/support
0 Kudos
Message 4 of 11
(9,699 Views)

Hi magpie15,

 

That is the point that LabVIEW does not have any detailed description possible causes for that error. Although there is a short description in LabVIEW Explain Error.

Regarding the subnet. You meant I would be able to connect only 254 clients using that subnet?

Actually I could connect up to 1000 clients. The problem occurs when the number goes over that number. At the other hand, please note that my clients are running on 3 different computers, so it means I have only 3 different IP addresses (less than 254). I guess the subnet limits not the number of clients, but the number of IP addresses in the network.

 

Thanks,

Gevorg

0 Kudos
Message 5 of 11
(9,693 Views)

I have found a few articles on TCP limitations that may be helpful, but nothing on the LabVIEW side of things, so far.

 

https://www.quora.com/What-is-the-maximum-number-of-simultaneous-TCP-connections-achieved-to-one-IP-...

http://smallvoid.com/article/winnt-tcpip-max-limit.html

 

What I am finding so far is that this is OS dependent. What OS are you running?

Maggie M.
Application Engineer
National Instruments.
http://www.ni.com/support
0 Kudos
Message 6 of 11
(9,670 Views)

Hi Maggie,

 

I tried Windows 10 Pro and Windows Server 2012 (Standard). The problem exist in both OS.

Actually I have already tried all the tricks in the links you have sent. In particular, they recommend to remove the limitation from windows registry keys. I have done everything, but nothing worked for me.

Is there a possibility that the limitation comes from TCP listener VI? Or is it something configurable in LabVIEW?

There were some articles stating that by-default Windows 10 allows 20 concurrent TCP connections, however I can connect 1000 clients. My problem occurs when the number of clients goes over 1018.

 

Gevorg Parsyan

0 Kudos
Message 7 of 11
(9,667 Views)

Unfortunately, I have not been able to find anything about this being an issue with LabVIEW TCP/IP. The error code 128 is not listed in the networking error codes and I have not been able to find anything about the TCP listener VI limiting the number of connections. 

 

You could try checking your ephemeral ports:

https://blogs.technet.microsoft.com/clinth/2013/08/09/detecting-ephemeral-port-exhaustion/

Maggie M.
Application Engineer
National Instruments.
http://www.ni.com/support
0 Kudos
Message 8 of 11
(9,645 Views)

Has there been any further developments on this issue?  I'm also seeing an Error 128 from TCP Wait ON Listener.  I'll attach a screen shot of my error.

 

Background: I'm using a Python script to query the values of controls and indicators via a TCP connection.  Any time I query, a new connection is made and closed when the response is received (much like a web page/server relationship).  Note my LabVIEW application is using the Actor Framework and I call the Actor running TCP Wait On Listener, "Script Server".  That is why the Error message is littered with "Actor Framework" and "Script Server" trace data.

 

image.png

0 Kudos
Message 9 of 11
(8,549 Views)

Hi , How did you solve this?

0 Kudos
Message 10 of 11
(5,549 Views)