Professional OPC
Development Tools


Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

SessioneTimeout doesn't work?

29 Jul 2021 13:32 #10067 by support
An updated, enhanced Knowledge Base article on OPC UA timeout settings: .

Please Log in or Create an account to join the conversation.

01 Apr 2020 17:56 #8343 by support

SessionTimeout has a different purpose - please read: .

It says (a quote from OPC specification): "Duration. Requested maximum number of milliseconds that a Session should remain open without activity. If the Client fails to issue a Service request within this interval, then the Server shall automatically terminate the Client Session."

What you are looking for might be OperationTimeout (which defaults to 120000 milliseconds). Unfortunately there is no parameter to make it easy to change. It can still be changed, but it requires more work. Please read:

For convenience, I am attaching the default configuration, so that you can modify it and then use, according to the article.

Best regards
<?xml version="1.0" encoding="utf-8"?>
  <!-- A human readable but not necessarily unique name for the application instance -->
  <ApplicationName>Client Application with EasyOPC-UA</ApplicationName>
  <!-- A globally unique identifier for the application instance.
       This is overridden with the value contained in the application certificate. -->
  <!-- A globally unique URI for the product (usually assigned by the product vendor) -->
  <!-- Indicates the type of application (Client, Server or ClientServer). -->
  <!-- Specifies security related configuration information -->
    <!-- The certificate store and the location of the application instance certificate in the certificate store -->
      <!-- The type of store. -->
      <!-- The location of the store. 
           Windows store must start with LocalMachine, CurrentUser or CurrentService
           The name of the store is appended.
           Note that the names used in code are difference from what appears in the control panel.
           e.g. My == "Personal", Root == "Trusted Root Certification Authorities" -->
      <StorePath>%CommonApplicationData%\OPC Foundation\CertificateStores\MachineDefault</StorePath>
      <!-- ReSharper disable once CommentTypo -->
      <!-- The subject for the certificate 
           Note that subject names are complex structures. The text that appears here is the CommonName component.
           A complete distinguished would be something like: 'CN=UA Sample Client, DC=MACHINENAME'
           The first certificate found is used if multiple certificates with the same CommonName exist. 
           The Thumbprint should be specified if the CommonName does not uniquely identify a certificate. -->
      <SubjectName>Client Application with EasyOPC-UA</SubjectName>
      <!-- The SHA1 thumbprint for the certificate.
           The thumbprint uniquely identifies a certificate.
           It should be specified in this file, however, the samples rely on quick and 
           dirty scripts to create new certificate on each machine. A commercial application 
           would generate the initial certificate itself and update the thumbprint accordingly -->
    <!-- The list of certification authorities. 
         Typical web browsing applications trust any certificate issued by a CA in the 
         "Trusted Root Certification Authorities" certificate store. However, this approach is 
         not appropriate for UA because Administrators have no control over the CAs that get
         placed in that Root store to facilitate web browsing. This means Administrators must
         specify a different store that is used only for UA related CAs and/or they must explicitly
         specify the certificate for each trusted certification authority. -->
      <StorePath>%CommonApplicationData%\OPC Foundation\CertificateStores\UA Certificate Authorities</StorePath>
    <!-- The list of trusted certificates. 
         Some UA applications will use self-signed certificates (certificates without a CA)
         which means that every application which communicates with it must be configured to 
         trust it.
         Administrators may designate a certificate store that contains trusted UA application 
         instance certificates (this store should not be the same as the store used for CAs 
         certificates). Alternately, Administrators may enter the certificates explicitly in
         this list.
         Note that entries in this list may either reference a certificate in the store or
         may contained the entire certificate encoded as base64 data.
      <StorePath>LocalMachine\UA Applications</StorePath>
      <StorePath>%CommonApplicationData%\OPC Foundation\CertificateStores\UA Applications</StorePath>
    <!-- Applications exchange Nonces during the CreateSession. This value specifies the length. Must be >= 32 -->
    <!-- The directory used to store invalid certificates for later review by the administrator. -->
      <StorePath>%CommonApplicationData%\OPC Foundation\CertificateStores\RejectedCertificates</StorePath>
  <!-- Maps different transports onto a .NET implementation of a WCF Binding
       WCF bindings are very complex and have many parameters that can be tweaked. To ensure
       interoperability the SDK has defined 3 standard bindings which can be selected with this
       element. Developers may define their own Bindings as well provided the inherit from the 
       Opc.Ua.Binding.BaseBinding type and implement the same constructor as the built-in binding
       Note protocols other than HTTP or UA-TCP are not considered to be interoperable -->
    <!-- This binding wraps the ANSI C implementation of UA-TCP instead of using the C# implementation. -->
    <!-- This binding uses the WCF binary encoded XML over TCP -->
    <!-- This binding uses the WCF binary encoded XML over PIPE -->
  <!-- Specifies quotas used to by the transport layer -->
    <!-- The default timeout in milliseconds for operations (used by clients) -->
    <!-- The maximum length for a string value in any message -->
    <!-- The maximum length for a byte string value in any message -->
    <MaxByteStringLength>4194304  </MaxByteStringLength>
    <!-- The maximum length for any array in a message. 
         Note that some protocols do not distinguish between bytes and arrays. 
         In these cases the binding will choose the larger of 
         MaxByteStringLength or MaxArrayLength-->
    <!-- The maximum size of any message -->
    <!-- The maximum buffer size 
         This value controls how big a block of memory the transport layer allocates.
         Setting this value to a large value will reduce performance and use a lot of RAM -->
    <!-- The lifetime of a SecureChannel in milliseconds.
         This specifies how long the server will keep a broken channel around while waiting 
         for a client to reconnect.
         Not used by HTTP or .NET TCP bindings -->
    <!-- The lifetime of a SecurityToken in milliseconds.
         This specifies how long a security token can be used without renewal. -->
  <!-- This element is only required for Client and ClientServer applications -->
    <!-- The default timeout for new sessions -->
    <!-- The well-known URLs for the local discovery servers
         URLs are tested in the order they appear in this list. -->
    <!-- EndpointDescriptions for system wide discovery servers -->
    <!-- The file used to save the EndpointDescriptions for servers known to the Client -->
	  <!-- The minimum subscription lifetime.
	  This ensures subscriptions are not set to expire too quickly. The requested lifetime count
	  and keep alive count are calculated using this value and the request publishing interval -->
  Masks supported by the trace feature. 
  Servers will detect changes within 5 seconds.
  Do not output any messages.
  None = 0x0;
  Output error messages.
  Error = 0x1;
  Output informational messages.
  Information = 0x2;
  Output stack traces.
  StackTrace = 0x4;
  Output basic messages for service calls.
  Service = 0x8;
  Output detailed messages for service calls.
  ServiceDetail = 0x10;
  Output basic messages for each operation.
  Operation = 0x20;
  Output detailed messages for each operation.
  OperationDetail = 0x40;
  Output messages related to application initialization or shutdown
  StartStop = 0x80;
  Output messages related to a call to an external system.
  ExternalSystem = 0x100;
  Output messages related to security
  Security = 0x200;
    <OutputFilePath>%LocalApplicationData%\OPC Labs\Logs\EasyUAClient.log.txt</OutputFilePath>
    <!-- Show Only Errors -->
    <!-- <TraceMasks>1</TraceMasks> -->
    <!-- Show Only Security and Errors -->
    <!-- <TraceMasks>513</TraceMasks> -->
    <!-- Show Only Security, Errors and Trace -->
    <!-- Show Only Security, COM Calls, Errors and Trace -->
    <!-- <TraceMasks>771</TraceMasks> -->
    <!-- Show Only Security, Service Calls, Errors and Trace -->
    <!-- <TraceMasks>523</TraceMasks> -->
    <!-- Show Only Security, ServiceResultExceptions, Errors and Trace -->
    <!-- <TraceMasks>519</TraceMasks> -->
  <!-- Enables the hi-res clock for the process to allows for shorter (<100ms) publishing and sampling intervals. -->
  <!-- QueryPerformanceCounter does not work on all multi-core machines so enabling the hi-res clock by default is not recommended. -->

Please Log in or Create an account to join the conversation.

01 Apr 2020 12:58 #8339 by Grizzo
Hi, we use READMULTIPLE generalli (cannot use SUBSCRIBE) and need to have a maximum response time of 30 seconds.
Sometimes, probably due to OPCServer not responding, the READMULTIPLE call remains stucked for 2 minutes.
I read the 2 mins is the standard timeout of the library and I tried to set it to 30 secs with SessionTimeout parameters, but it does not seem to work.

Beacuse we do not use Isolated client, the SessionTimeout to set is a property of OpcLabs.EasyOpc.UA.EasyUAClient.AdaptableParameters.SessionParameters.
I tried to set it up before and after instantiating EasyUAClient object and opening connection without any results: the timeout is always 2 minutes.

The documentation and/or search in forums didn't give me an answer. What could be wrong? Some suggestion on How To set up the timeout?
A piece of example code would be appreciated.


Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.204 seconds