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
Disconnecting client
June 22, 2016
6:46, EEST
Avatar
pramanj
Member
Members
Forum Posts: 86
Member Since:
October 21, 2014
sp_UserOfflineSmall Offline

Dear Sir,
I want to know what precautions have to be taken when I close my OPC UA client application which is connected to a third party OPC UA Server? My client subscribes to some nodes on server and performs some browse/read/write operation. The shutdown scenerios are as follows:

1. Client remains conencted indefinitely. The client /server laptop may go to hybernate mode and come alive in any squence. Will the protocol take care of dsconnecting and restoring the connection appropriately?
2. If the client application is terminated by user abruptly by deleting the window , then what happens to the server (third party, not PROSYS’s server)? Will the subscriptions on server get deleted/garbage collected by the server automatically? Will repeated restart of the client lead to memory leaks in the server. (I see that the subscription ID keeps incrementing every time we restart the client, until we restert the server). Hope the client shuts down after disconnecting from server gracefully?
3. If user exits the client application thru proper selection of exit option, then what precautions do we have to take in our application to shutdown gracefully from the server? (What calls do we have to make to the server to disconnect from it gracefully)?
4. Are there any situations that can cause the cleint application to shutdown or crash the server? What precuations should we take to avoid such situation especially in a running plant the servr crash or restart could be disasterous!

Best Reagrds
PRAMANJConfused

June 22, 2016
16:04, EEST
Avatar
Heikki Tahvanainen
Member
Members
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hi,

Calling UaClient.disconnect() method disconnects from the server gracefully.

If you terminate the client application abruptly, then the OPC UA server will consider this session expired after session timeout has passed. The session timeout is configurable and depends on application scenario. In SampleConsoleServer the default session timeout is one hour. After this time the server should clear all resources associated with the Session.

In the client side SDK, the UaClient.reconnect() method will activate the previous session or create a new session if needed.

Hopefully this answers your questions.

June 22, 2016
20:48, EEST
Avatar
pramanj
Member
Members
Forum Posts: 86
Member Since:
October 21, 2014
sp_UserOfflineSmall Offline

Yes sir, indeed it has clarified my doubts. Thanks this was very useful.
Just one more thing. What happens to the subscriptions when client is closed abruptly?
Do the subscriptions also get closed on server after the time out period of 1 hour?

Also is there a limit on number of nodes that can be subscribed in a single subscription? Or practically there is no limit?

regards
PRAMANJ

June 28, 2016
17:05, EEST
Avatar
Heikki Tahvanainen
Member
Members
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hi,

Yes, the server should clear the subscriptions when the corresponding session closes.

In Prosys OPC UA Java SDK, there’s no limit in number of MonitoredItems that can be contained in a single subscription.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
18 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: 737

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1524

Posts: 6450

Newest Members:

fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1