Application With LabVIEW Web Services Crashes and Reports Error 3299

Updated Aug 29, 2023

Reported In

Software

  • LabVIEW

Issue Details

I am running a LabVIEW application that uses Web Services on a Windows 10 pc. After some time running, the application crashes randomly. Reviewing the error log information, I found the following errors:

appweb: Error 3299: No free workers. Increase thread limit (Count 10 of 10).

Solution

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.

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

If you do not have enough information about the error causing the hang or crash of the Application or System Web Server, follow the steps in the following article to configure error logging: Configure Error Logging for Application or System Web Server.