Increasing LabVIEW Web Service to Allow More Than Ten Connections

Updated May 3, 2018

Reported In

Software

  • LabVIEW

Issue Details

When I publish a LabVIEW Web service, I find that only ten other network devices can access it before the Web service starts refusing connections. This problem happens whether I deploy directly from LabVIEW, use an installer, or run a Web Service attached to an executable. What is causing this behavior and how can I resolve this connection limit issue?

Solution

Application Web Server Web Services
When you deploy a Web service directly from LabVIEW or create an installer that deploys a stand-alone Web service, the resulting Web service runs in the NI Application Web Server. By adjusting the Application Web Server, we can change the default client limit property.
  1. Navigate to C:\Program Files (x86)\National Instruments\Shared\NI WebServer.
  2. Using a text editor, open NISystemWebServer.conf.
  3. In the line beneath the LimitRequestForm token, add the command LimitClientsfollowed by a number, such as LimitClients 25. The number you enter represents the maximum number of clients that will be able to connect to your Web service.
  4. Save and close the configuration file.
  5. Please repeat steps three and four with NIWebAppServer.conf.
  6. After changing the configuration files, you will need to restart the NI System Web Service (a Windows Service) or restart your computer. After that, you should be able to deploy Web services that reflect your newly configured client limit.

 
Executables with Web Services
When you include a Web service in a stand-alone application, the build process creates a separate web server for the Web service to use (it does not use the NI Application Web Server). In light of this architecture difference, the process for adjusting the client limit is slightly different.
  1. Navigate to the directory where your executable has been built.
  2. Using a text editor, open niembeddedws.conf.
  3. In the line beneath the LimitRequestForm token, add the command LimitClients followed by a number, such as LimitClients 25. The number you enter represents the maximum number of clients that will be able to connect to your Web service.
  4. Save and close the configuration file.
  5. If you have the executable open, please close and re-open it. After you have adjusted the single configuration file, the included Web service should reflect your adjusted client limit.

Additional Information

Starting in LabVIEW 2013, the Application Web Server allows only ten client connections at a time. While this default client limit has been set, we can add a configuration token to specific files and adjust the connection limitation to meet our needs.

WAS THIS ARTICLE HELPFUL?

Not Helpful