01-04-2012 12:16 PM
To start out, I am running Labview 2010 sp 1. I have a web service and some substantial code running on a 2120. The web service is outputting 6 variables including strings and integers to a router which is forwarding them to the outside world. The web service is pulling the 6 variables out of the main RT code into a web service vi by shared variables.
The web service deploys and runs without any issue, but it will stop outputting numbers after somewhere between 1 to 72 hours. After is stops working it wont start working again until I reboot the 2120. I cant find any corrolation to why it stops working and the main RT code continues to run. The distributed system manager shows that the shared variables are updating successfully. The web service vi must be freezing up. It consists of little else than the shared variables with thorough error handling.
Are there any ideas of whats causing this or are there any diagnostic tools that I can use?
Thanks!
01-05-2012 05:20 PM
Hello,
What OS are you using? Where there any errors thrown when the web service froze?
01-05-2012 05:31 PM
The host computer is running Windows 7 Professional but I believe that is irrelevant because the web service is running on the cfp-2120. The 2120 has Fieldpoint 6.0.9 on it. There are no errors that occur when the web service freezes. The only way that I know is by the fact that url that usually displays the web service data starts timing out.
My current theory is that the cfp-2120 is maxing out either the memory or the processor. I was thinking of moving the web service to the host computer but I am not sure how to deploy the web service to a computer that does not have the full version of Labview on it, (aka where do I put the .lvws file?)
01-09-2012 10:29 AM
If you install the system state publisher on your cfp then you can monitor your memory usage and cpu usage in Distributed System Manager. That should help you figure out what is happening with your cfp's memory and cpu.
You can also check out this guide for adding webservices to an application that only has the LabVIEW Runtime Engine on it: How to Create and Install a Build Application Containing Web Service VIs in LabVIEW 2009
08-04-2017 02:30 AM
Hello,
I know that this thread is old but it appears that I am currently encountering the same behavior except that the webservice is running on a NI-linux-RT cRIO 9030.
I am wondering if there has been any new information about this issue.
Alternatively is there a way to catch some error or logs from the webservice?
Or maybe to restart programmatically the webservice if I can detect it is down?
05-09-2018 06:51 AM
@noar12 wrote:
Hello,
I know that this thread is old but it appears that I am currently encountering the same behavior except that the webservice is running on a NI-linux-RT cRIO 9030.
I am wondering if there has been any new information about this issue.
Alternatively is there a way to catch some error or logs from the webservice?
Or maybe to restart programmatically the webservice if I can detect it is down?
Hello, we have similar problems. Just wonder if your problem is resolved and how.
05-09-2018 07:12 AM
not really resolved unfortunately.
what I have done is a workaround with the following steps:
1) make a small selfrequest by the RT for the webservice it is hosting every 10 sec or so
2) if no response I consider the webservice as dead, I save some information useful to be able to restore the state of the cRIO (fileID currently in use etc.) and reboot
The only application where I have encountered such problem is when I used webservice for monitoring status which implies to make request every seconde (or more). It looks like webservice doesn't like this use case.
For more recent application I use TCP communication for status monitoring and webservice only for not frequent request and it seems to work
Hope it will help at least a little
05-09-2018 07:34 AM
@noar12 wrote:
not really resolved unfortunately.
what I have done is a workaround with the following steps:
1) make a small selfrequest by the RT for the webservice it is hosting every 10 sec or so
2) if no response I consider the webservice as dead, I save some information useful to be able to restore the state of the cRIO (fileID currently in use etc.) and reboot
The only application where I have encountered such problem is when I used webservice for monitoring status which implies to make request every seconde (or more). It looks like webservice doesn't like this use case.
For more recent application I use TCP communication for status monitoring and webservice only for not frequent request and it seems to work
Hope it will help at least a little
Thanks very much for the insight. It helps a lot. I think you are right LV web service is not for frequent data polling. We should consider adopt TCP communication. Could you share your knowledge on it please? A few links will get me start. Many thanks.
05-09-2018 07:45 AM
There are some exemple in the NI exemple finder which can be useful:
- simple TCP
- TCP Multiple Connections
These could be a start.
If you need to build a more specific com protocol this link can also be useful
05-16-2018 05:47 AM
Did anyone with this issue every discover if it is memory related? The "fails after a while" behaviour suggest a memory or other resource leak. Could anyone post a web service VI that shows the issue?