LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

web service intermittently stops woking

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!

0 Kudos
Message 1 of 11
(4,029 Views)

Hello,

What OS are you using? Where there any errors thrown when the web service froze?

Jacob R. | Applications Engineer | National Instruments

0 Kudos
Message 2 of 11
(4,019 Views)

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?)

0 Kudos
Message 3 of 11
(4,017 Views)

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

Scott A
SSP Product Manager
National Instruments
0 Kudos
Message 4 of 11
(4,000 Views)

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?

 

 

0 Kudos
Message 5 of 11
(3,765 Views)

@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.

0 Kudos
Message 6 of 11
(3,610 Views)

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

Message 7 of 11
(3,607 Views)

@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.

0 Kudos
Message 8 of 11
(3,604 Views)

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

http://www.ni.com/tutorial/53683/en/

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

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?

0 Kudos
Message 10 of 11
(3,520 Views)