Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Timeout issues
October 22, 2015
8:41, EEST
Avatar
jun
Member
Members
Forum Posts: 7
Member Since:
June 18, 2015
sp_UserOfflineSmall Offline

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.

October 22, 2015
12:43, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

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

October 23, 2015
9:06, EEST
Avatar
jun
Member
Members
Forum Posts: 7
Member Since:
June 18, 2015
sp_UserOfflineSmall Offline

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!

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
13 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 683

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

digitechroshni, LouieWreve, Kickbiche, karrimacvitie5, graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma

Moderators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1