-
-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
client getting timeout when monitoring items. Is there a way to set the RequestHeader? #141
Comments
Could you let me know where to find the "OPC Boiler sample server." |
I am using version 0.0.49 |
One more little detail: |
Thank you I can reproduce the error.
will cause keep alive to be send by server every = 5s = 5x1000 ms (PublishingInterval*MaxKeepAliveCount ) Note that the server may revise the various parameters: console.log("revised publishingInterval :", subscription.publishingInterval);
console.log("revised lifetimeCount :", the_subscription.lifetimeCount);
console.log("revised maxKeepAliveCount :", the_subscription.maxKeepAliveCount); The PublishRequest.RequestHeader.timeoutHint shall be set to at least revisedLifetimeCount * revisedPublishingInterval or to 0, to mean infinite timeout. |
Wow, thanks for your quick response and your effort! |
One more suggestion:
|
@pelis, let me know if the previous commit solve your issue. |
Yes, thanks again... |
I have now done some more testing with various keepAliveCount variations. The problem comes back for some reason, when I increase keepAliveCount (e.g. 20). Is there a reason why you wouldn't use requestedLifetimeCount: |
@pelis can you describe the configuration you have that generates this problem ?
Ideally I would like to recreate the situation into a end_2_end automated test that clearly demonstrate the issue. Your help is welcome. |
I am running both - server and client on a Windows 8.1 machine, using the Boiler sample above. I have extracted the code which could be used to play or test with it - however I have not really looked into your end-2-end testing setup. |
you could publish the file in a gist => https://gist.github.com/ and reference the gist link in this thread. |
Specification Part 3
Therefore setting timeoutHint to something like (self.maxKeepAliveCount + 10 ) * self.publishingInterval shall be sufficient. However, to deal with network latency, OPCUA suggests that the client send a bunch of PublishRequest in advance to the server.
This mean that the timeoutHint must be mitigated to take into account the number of unprocessed PublishRequest that are waiting in the server publish engine queue. Knowing that the server will process then at worst every maxKeepAliveCount *publishInterval,
Let me fix this. |
OK, after messing things up trying to directly upload files :-) I have now put the files in: monitor.js is not using any of the helper function - I have just used the very high-level API calls. |
@pelis, I have been reviewing your code, and it appears to me that the reconnection strategy shall be encapsulated inside the node-opcua OPCUAClient class and not in your code. This will hide all the plumbing from you and make you code easier to manage. I suggest that we keep this issue to deal with the original topic (timeout in monitored item ) and create a new enhancement request. |
Oops, I am confused , we will use #144 for this. |
Oh yes, absolutely – I think it’s rather fundamental – at least in my use-cases. I think it should be configurable as well regarding reconnect timeout, enable/disable, … |
as agreed with @pelis, let close this issue. original timeout problem is now fixed |
Hi,
great package!
I am having trouble with client time-outs. Currently I am testing against the OPC Boiler sample server. Just to test the time-out behavior I am testing the server when it does NOT send anything - some servers the we are trying to link to will not send data for quite a while...
This is how I connect:
I was hoping that the timeout would compute to:
requestedLifetimeCount * requestedPublishingInterval (1000 * 100);
No matter what values I set here, the time-out described below never changes
(“Timeout … waiting for response for” in ../lib/client/client_secure_channel_layer.js)
What I observe is:
I have two questions:
Can I somehow increase RequestHeader.timeoutHint, or is there any way to increase the time-out?
Is there a way to intercept that event (lib/client/client_secure_channel_layer.js) ?
Thanks in advance
The text was updated successfully, but these errors were encountered: