8:41, EEST
June 18, 2015
Hello,
we are using the client SDK 2.2.0-552 and experience these timeout issues during the connection with (only) some commercial opcua servers:
11:21:19.977 [Blocking-Work-Executor-62] WARN o.o.u.t.t.i.SecureChannelTcp – Request id=35961 timeouted 120001ms elapsed. timeout at 120000ms
11:21:20.898 [TcpConnection/Read] WARN o.o.u.t.t.i.SecureChannelTcp – 114284 Unidentified message, RequestId=41477, type=ServiceFault!
11:21:20.898 [TcpConnection/Read] WARN o.o.u.t.t.i.SecureChannelTcp – ServiceFault=ServiceFault: Bad_Timeout (0x800A0000) “The operation timed out.”
Diagnostic Info:
Thanks in advance for any suggestions for possible reasons or also for tips how or where to investigate.
12:43, EEST
April 3, 2012
Hi,
In 2.2.0 we implemented PublishRequest timeouts. The default timeout time is 2 minutes. This can be configured in UaClient.setPublishRequestTimeout. Before it was UnsignedInteger.MAX_VALUE
Technical/Complex stuff (also ended up quite long post, sorry):
The reason for the non-infinite timeout is that there is a possibility for a “deadlock” if a server manages to send all PublishResponses back during a small connection break. The client wont send any more requests (how many the client sends depends on UaClient’s publishRequestFactor and number of subscriptions) because it has not received any response (because of the communication break) and the server wont have any requests to response so neither will do anything and the Subscription itself will timeout on the server after lifetime ends. If the requests do timeout on the client side before the subscription has been idle for it’s Lifetime, the client will notice the timeout and send more requests, i.e. the situation is recovered.
We have received similar report recently. We have found 2 bugs in related to this.
1. One is that t is possible that under heavy load (lots of subscriptions/lots of notificates) a PublishRequest might be sent twice. Most of the servers probably wont mind this, but the client side only accepts the first reply (they have the same RequestId), this creates the Unidentified message warning. This one is fixed.
2. The second is related how the server determines the timeouts of the PublishRequests. It is possible that we responsing an already timeouted request. This is somewhat fixed currently.
Techical stuff related to 2.
The problem is that the server should wait at least the TimeoutHint amount given in the request. If we do reply when it is almost but not yet timeouted, it might timeout during network travel (depends on latency and computer clocks).
My conclusion is that the PublishRequest timeout should be set to suitable value depending on PublishInterval/KeepAlive/Lifetime. The KeepAlive should such that in normal conditions there would be no timeouts (i.e. the server has always at least a KeepAlive Notification to send before any PublishRequest timeouts). The Timeout should be such that you do receive the timeout well before Lifetime end (otherwise there is no point, since the point is to avoid the subscription itself from timeouting). As long as you have a single Subscription this logic is somewhat easy. If you have multiple, then it is more complicated. You could for now maybe keep it at the old MAX_VALUE if the possibility for communication breaks is low. I am not sure which would be the ideal solution.
Email at uajava-support@prosysopc.com if you want to try the current (beta) build. These fixes will be part of 2.2.2. which we hope to release soon.
(NOTE! the beta uses currently the MAX_VALUE because I’m not sure is it still a better default value…)
– Bjarne
9:06, EEST
June 18, 2015
Dear Bjarne,
thanks a lot for the information!
We decided to wait for the release of 2.2.2. Please let us know, if this release will solve the issues mentioned above or require us to change some settings to reach stability (as PublishRequestTimeout).
In general, a short documentation about recommended combinations of settings for different use cases (such as unreliable network or many subscriptions) would be a big help in the case when standard settings are not sufficient to guarantee stable and reliable long-running communication.
We are looking forward for the upcoming release!
Most Users Ever Online: 1919
Currently Online:
23 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 731
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
inilarythikibia, rickykennion, PromotionToold, HypromeImpupe, toneylapham544, rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1