Jump to content

Maximum # of UDP sockets?


Mellroth

Recommended Posts

Hi,

I need to have a lot of UDP sockets in a server implemented on a LabVIEW RT machine, but currently there seems to be limit of 60 sockets.

Even if the Maximum Number Of Sockets is set to 200 in MAX.

To test number of sockets available, I use the code displayed below.

post-5958-1190824503.png?width=400

When no more sockets can be opened the VI returns error 42 in UDP Open, (Generic Error).

Anyone know how to get past this limit?

I guess I'm missing something obvious.

/J

Link to comment

QUOTE(JFM @ Sep 26 2007, 09:42 AM)

In Windows XP SP2 there is a limit to the number of sockets that the OS will allow you to open, in order to prevent viruses from spreading (talk about a band-aid solution). There is a patch tool, here (use at your own risk), that will allow you to adjust this.

Link to comment

Thanks for your comments, but my guess is that this is only solved by some hidden KEY in the NI-RT.ini file.

QUOTE(Neville D @ Sep 27 2007, 12:02 AM)

Currently Broadcast is not an option, it has been ruled out earlier.

I have tried to add a delay, but that has no effect. What matters is how you set the Maximum Number of Sockets in MAX.

If you break the limit given in MAX, you'll get error code 11, (To many files open), if you then increase the number in MAX, you will instead run into another limit, that throws error 42 when it is reached.

QUOTE(Jim Kring @ Sep 27 2007, 01:59 AM)

In Windows XP SP2 there is a limit to the number of sockets that the OS will allow you to open, in order to prevent viruses from spreading (talk about a band-aid solution). There is a patch tool,
(use at your own risk), that will allow you to adjust this.

I need to open my sockets on a RT target, I guess this tool is only for Windows, or can it be used on Pharlap as well?

For the record I have tried to open 1000 UDP sockets on Windows, without any problem.

/J

Link to comment

QUOTE(JFM @ Sep 26 2007, 10:21 PM)

Thanks for your comments, but my guess is that this is only solved by some hidden KEY in the NI-RT.ini file.

Currently Broadcast is not an option, it has been ruled out earlier.

I have tried to add a delay, but that has no effect. What matters is how you set the Maximum Number of Sockets in MAX.

If you break the limit given in MAX, you'll get error code 11, (To many files open), if you then increase the number in MAX, you will instead run into another limit, that throws error 42 when it is reached.

I need to open my sockets on a RT target, I guess this tool is only for Windows, or can it be used on Pharlap as well?

For the record I have tried to open 1000 UDP sockets on Windows, without any problem.

/J

I think it is time to get NI involved. Open up a service request and get some of NI's RT experts to take a look. Your problem is easily duplicated, so its something they can follow up with pretty quickly.

good luck.

N.

Link to comment

QUOTE(Neville D @ Sep 27 2007, 07:04 PM)

I think it is time to get NI involved. Open up a service request and get some of NI's RT experts to take a look. Your problem is easily duplicated, so its something they can follow up with pretty quickly.

good luck.

N.

Thanks,

I have contacted NI, but the first suggestion was to increase the Maximum Number of Sockets, but that didn't solve my problem.

We have a workaround, that will solve this specific problem, but I still don't think that the OS should limit the number of sockets (it's OK to limit the number by default, but it must be possible to get past this limit somehow).

I'll update this thread if/when I get a clear response from NI.

/J

Link to comment
  • 2 weeks later...

QUOTE(JFM @ Oct 8 2007, 07:54 AM)

Hi,

I just received information from NI, that this is a limitation of the Pharlap OS, on VxWorks targets (e.g. cRIO 9012) this limitation does not exist.

NI will fix the error message in LV-RT 8.5.1, but has no more information to get past this limit.

I'm not sure what version of Pharlap they purchased. But even if they got the source code for it, fiddling with the network socket code in an OS is a very tricky thing to do. Probably there would be a #define somewhere for the maximum allowable sockets and that is were it goes wrong. In many RT OSes the sockets are maintained in a static list and being static means it is preallocated at compile time and can never grow bigger than the max. Changing that into a dynamic list has possible performance drawbacks and makes the resource management in general more complex, so that is not something one wants to modify into an existing static implementation.

Nice to hear that VxWorks seems not to have this limitation.

Rolf Kalbermatter

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.