Professional OPC
Development Tools

logos

Advanced Search

Search Results (Searched for: operationtimeout)

01 Apr 2020 17:56
Replied by support on topic SessioneTimeout doesn't work?

SessioneTimeout doesn't work?

Category: Reading, Writing, Subscriptions

Hello,

SessionTimeout has a different purpose - please read: opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...Parameters~SessionTimeout.html .

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:

opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...plication%20Configuration.html

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"?>
<ApplicationConfiguration
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:ua="http://opcfoundation.org/UA/2008/02/Types.xsd"
  xmlns:s1="http://opcfoundation.org/UA/Sample/Configuration.xsd"
  xmlns:s2="http://opcfoundation.org/UA/SDK/COM/Configuration.xsd"
  xmlns="http://opcfoundation.org/UA/SDK/Configuration.xsd"
>
  <!-- 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. -->
  <ApplicationUri>urn:localhost:OpcLabs:EasyOpc:UA:EasyUAClient</ApplicationUri>
 
  <!-- A globally unique URI for the product (usually assigned by the product vendor) -->
  <ProductUri>http://www.opclabs.com/QuickOPC-UA</ProductUri>
 
  <!-- Indicates the type of application (Client, Server or ClientServer). -->
  <ApplicationType>Client_1</ApplicationType>
 
  <!-- Specifies security related configuration information -->
  <SecurityConfiguration>
 
    <!-- The certificate store and the location of the application instance certificate in the certificate store -->
    <ApplicationCertificate>
 
      <!-- The type of store. -->
      <StoreType>Directory</StoreType>
 
      <!-- 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 -->
      <!--<Thumbprint>...</Thumbprint>-->
 
    </ApplicationCertificate>
 
    <!-- 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. -->
    <TrustedIssuerCertificates>
      <StoreType>Directory</StoreType>
      <StorePath>%CommonApplicationData%\OPC Foundation\CertificateStores\UA Certificate Authorities</StorePath>
    </TrustedIssuerCertificates>
 
    <!-- 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.
         -->
    <!--<TrustedPeerCertificates>
      <StoreType>Windows</StoreType>
      <StorePath>LocalMachine\UA Applications</StorePath>
    </TrustedPeerCertificates>-->
    <TrustedPeerCertificates>
      <StoreType>Directory</StoreType>
      <StorePath>%CommonApplicationData%\OPC Foundation\CertificateStores\UA Applications</StorePath>
    </TrustedPeerCertificates>
 
    <!-- Applications exchange Nonces during the CreateSession. This value specifies the length. Must be >= 32 -->
    <NonceLength>32</NonceLength>
 
    <!-- The directory used to store invalid certificates for later review by the administrator. -->
    <RejectedCertificateStore>
      <StoreType>Directory</StoreType>
      <StorePath>%CommonApplicationData%\OPC Foundation\CertificateStores\RejectedCertificates</StorePath>
    </RejectedCertificateStore>
 
  </SecurityConfiguration>
 
  <!-- 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
       provide.
 
       Note protocols other than HTTP or UA-TCP are not considered to be interoperable -->
<TransportConfigurations>
    <!-- This binding wraps the ANSI C implementation of UA-TCP instead of using the C# implementation. -->
    <!--
    <TransportConfiguration>
      <UriScheme>opc.tcp</UriScheme>
      <TypeName>Opc.Ua.NativeStack.NativeStackBinding,Opc.Ua.NativeStackWrapper</TypeName>
    </TransportConfiguration>
    -->
 
    <!-- This binding uses the WCF binary encoded XML over TCP -->
    <TransportConfiguration>
      <UriScheme>net.tcp</UriScheme>
      <TypeName>Opc.Ua.Bindings.UaSoapXmlOverTcpBinding</TypeName>
    </TransportConfiguration>
    <!--
    -->
 
    <!-- This binding uses the WCF binary encoded XML over PIPE -->
    <TransportConfiguration>
      <UriScheme>net.pipe</UriScheme>
      <TypeName>Opc.Ua.Bindings.UaSoapXmlOverPipeBinding</TypeName>
    </TransportConfiguration>
    <!--
    -->
 
  </TransportConfigurations>
 
  <!-- Specifies quotas used to by the transport layer -->
  <TransportQuotas>
 
    <!-- The default timeout in milliseconds for operations (used by clients) -->
    <OperationTimeout>120000</OperationTimeout>
 
    <!-- The maximum length for a string value in any message -->
    <MaxStringLength>1048576</MaxStringLength>
 
    <!-- 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-->
    <MaxArrayLength>655350</MaxArrayLength>
 
    <!-- The maximum size of any message -->
    <MaxMessageSize>4194304</MaxMessageSize>
 
    <!-- 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 -->
    <MaxBufferSize>65535</MaxBufferSize>
 
    <!-- 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 -->
    <ChannelLifetime>300000</ChannelLifetime>
 
    <!-- The lifetime of a SecurityToken in milliseconds.
         This specifies how long a security token can be used without renewal. -->
    <SecurityTokenLifetime>3600000</SecurityTokenLifetime>
  </TransportQuotas>
 
  <!-- This element is only required for Client and ClientServer applications -->
  <ClientConfiguration>
    <!-- The default timeout for new sessions -->
    <DefaultSessionTimeout>60000</DefaultSessionTimeout>
 
    <!-- The well-known URLs for the local discovery servers
         URLs are tested in the order they appear in this list. -->
    <WellKnownDiscoveryUrls>
      <ua:String>opc.tcp://{0}:4840</ua:String>
      <ua:String>http://{0}:52601/UADiscovery</ua:String>
      <ua:String>http://{0}/UADiscovery/Default.svc</ua:String>
    </WellKnownDiscoveryUrls>
 
    <!-- EndpointDescriptions for system wide discovery servers -->
    <DiscoveryServers></DiscoveryServers>
 
    <!-- The file used to save the EndpointDescriptions for servers known to the Client -->
    <EndpointCacheFilePath>OpcLabs.EasyOpc.UA.EasyUAClient.Endpoints.xml</EndpointCacheFilePath>
 
	  <!-- 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 -->
	  <MinSubscriptionLifetime>10000</MinSubscriptionLifetime>
  </ClientConfiguration>
 
  <Extensions>
  </Extensions>
 
  <!--
  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;
  -->
 
  <TraceConfiguration>
    <OutputFilePath>%LocalApplicationData%\OPC Labs\Logs\EasyUAClient.log.txt</OutputFilePath>
    <DeleteOnLoad>true</DeleteOnLoad>
    <!-- Show Only Errors -->
    <!-- <TraceMasks>1</TraceMasks> -->
    <!-- Show Only Security and Errors -->
    <!-- <TraceMasks>513</TraceMasks> -->
    <!-- Show Only Security, Errors and Trace -->
    <TraceMasks>515</TraceMasks>
    <!-- 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> -->
  </TraceConfiguration>
 
  <!-- 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. -->
  <DisableHiResClock>true</DisableHiResClock>
 
</ApplicationConfiguration>
18 May 2019 14:03
Replied by support on topic block in CallMethod

block in CallMethod

Category: QuickOPC-UA in COM

Alright, in order to figure out the issue with UserIdentity, I would have to see all parts of the code involved. But I guess that's not important at the moment, because you *somehow* got it running (although in a weird manner). Let's focus now on the CallMethod block.

Have you tried the same method with some other OPC UA client, and what were the results? The first thing I want to determine is whether the "block" isn't actually on the server. If it were on the server side, the CallMethod will actually return, but after quite long time (I think the default is 10 minutes, for OperationTimeout on the client side).

And that's another test I want you to make please. Please wait for approx. 11 minutes., and check whether the function returns or not. If it then returns with an error, what is the error?


Best regards
05 Apr 2019 06:40
Replied by support on topic In some situations, 'BrowseDataNodes' does not complete within 20 seconds.

In some situations, 'BrowseDataNodes' does not complete within 20 seconds.

Category: Discovery, Browsing, Browse Dialogs and Controls

Hello.

I will start from the end of your report - the part about bxsdk32.dll. This seems related to a 3-rd party product that is included in QuickOPC and takes of "virtualization" of some dependency files (such as UA Certifiate Generator), so that they do not have to be pre-installed on the machine. We have encountered problems with this library from time to time (seldom, but still). So, first thing I'd suggest to do, is to make sure that the "bxsdk32.dll" problem is not causing further issues down the road. To do, so, there is a way to turn off this "prerequisite boxing". Instructions are here: kb.opclabs.com/How_to_disable_prerequisites_boxing .

Only if the problem persists then:

Yes, allocate more than 20 seconds. In fact, for the worst case, we need to allocate more than 10 minutes, because in the rare case, this is the default value of the longest timeout in effect (OperationTimeout). And, we need to know whether BrowseDataNode returns then - and if it does return with an error (exception), then the details of that error. That may bring the information needed already. If not, we can proceed by obtaining detailed traces and logs (do not do that now, I would send instructions if we come that far).

Best regards
09 Mar 2019 16:23
Replied by support on topic Unable to reconnect to OPC Server

Unable to reconnect to OPC Server

Category: Connections, Reconnections, Certificates

Hello,
thank you for the files.

I have some questions:

1. Are you running on .NET Core, or .NET Framework? If on .NET Core, which operating system? I have to ask because you have also not provided the LogEntry notifications from the start of the program, which contain all of this. [note to myself: this question relates to the appearance of BadNotConnected status code]

2. Please confirm that you are running QuickOPC version 2018.3. Again that would be in the log entries at the beginning, but I do not have them.

3. It seems that each notification is written exactly 5 times in the files. I can "filter it" out, but I just want to not whether you are aware of it, and why is it. Aren't you hooking multiple times to the same static event?

4. When the logs were taken, were you running with debugger attached, or without?

5. Are you logging just Warning/Error kinds of notifications in LogEntry, or are Information notifications also included? (I do not see them, so I do not know whether they were not generated, or whether they were generated but not included in the log file).

6. Have you tried to wait very long (such as over 20 minutes) to see if there is still no recovery? What happens then? The reason I am asking this is that there are various timeout periods, and most of them are quite short, but the default for the so-called OperationTimeout is 10 minutes I believe, so under rare circumstances this can slow down things. I am almost sure that this is not the case here, but want to verify it anyway.

[Note to myself for possible next troubleshooting step, depending on the answers: deadlock analysis, extended tracing + wireshark]
15 Jun 2018 12:56
Replied by support on topic Possible Session Timeout before SessionTimeout is hit

Possible Session Timeout before SessionTimeout is hit

Category: Reading, Writing, Subscriptions

12 Mar 2018 15:10
Replied by support on topic BadSecureChannelClosed

BadSecureChannelClosed

Category: Reading, Writing, Subscriptions

Hello,

I also need to know the following:

1. Which version and build of QuickOPC you are using.

2. In the duplicate posting you made, you mention the fact that ReadMultipleValues blocks. If it blocks, it cannot return an error. Are we then discussing two issues here? - one that the function does not return, and the other that you get the error that does not recover? Please clarify.

3. When you do get the BadSecureChannelClosed, is that from ReadMultipleValues, or is it reported through the data change notification (or both?)

4. For complete analysis, can you please wait a bit more than 10 minutes on ReadMultipleValues to see whether it truly does not return even after this long time. The reason for it is that one of the timeouts involved (OperationTimeout) defaults to 10 minutes.

5. Very important: When you get into the situation where the application does not recover, start a second instance of the same application, and try to connect. Do you also get an error, or does the second instance work well?

Thank you
19 Jan 2018 15:41
Replied by support on topic ReadMultiplevalues never comes back

ReadMultiplevalues never comes back

Category: Connection, Reconnections, Certificates

The default OperationTimeout is 2 minutes. If the method does not return after that, it is likely an issue of QuickOPC itself. We have recently fixed such an issue; however the fix will be only available i the upcoming version (2018.1), scheduled for release most likely in February.

If you are interested I can send you a private link to test the Beta version of it.
(Note: with Delphi, you will have to re-import the type libraries, as they have changed).

Best regards
19 Jan 2018 08:26
Replied by I-Tecnology on topic UA parameters corresponding to DA parameters, OperationTimeout

UA parameters corresponding to DA parameters

Category: Reading, Writing, Subscriptions

Thank you for your answer. It's very complete.

You're right, the problem is on the first read, if PLC is not conncted when I start the application.

I will try to move (carefully) parameter on the OPC server side.

Thank you
19 Jan 2018 08:06 - 19 Jan 2018 08:08
Replied by support on topic UA parameters corresponding to DA parameters, OperationTimeout

UA parameters corresponding to DA parameters

Category: Reading, Writing, Subscriptions

Here is why I strongly recommends against changing the OPC UA-level timeout for achieving what you have described.

The two timeouts - the one for the communication between the OPC UA client and the server, and the other for communication between the OPC server and the PLC - have very different purpose, and one cannot safely stand for the other.

If you shorten the OPC UA-level timeout in order to get "faster response" in case of communication problems, here is what will likely happen: The UA client side will abandon the pending request sooner, but it will not be cancelled on the UA server. The server will continue waiting for the value from the PLC. Further requests to the server, if they come "too soon", will have to wait until the outstanding requests are finished, make them to take even longer(!). And the number of uncompleted requests may start rising inside the server, causing further problems such as memory increase, queue overflows etc.

Suggestions to handle your issue properly depend on the application, but in general they are:
- Whenever possible, use OPC subscriptions instead of repeated Reads.
- Set the timeout for communication between the OPC server and the PLC to the right value.
- If you have to use the Reads, set the MaximumAge in the UAReadParameters (that you can pass to the Read) to a value that would allow the server to provide you the value from its cache in usual case (and, if needed and supported, configure the server to poll the value periodically for you). In fact, default value for MaximumAge already asks the server to give data form the cache anyway, so I am a bit surprised that your calls need to wait for the PLC, but it is possible that either you have changed the MaximumValue, or that the issues arise on the first Read when obviously there is nothing in the cache, or that the server does not interpret the MaximumAge correctly.

Best regards
19 Jan 2018 07:50 - 19 Jan 2018 08:07
Replied by support on topic UA parameters corresponding to DA parameters, OperationTimeout

UA parameters corresponding to DA parameters

Category: Reading, Writing, Subscriptions

I will respond in two posts. In this first post, I will try to explain how to do what you have asked for. In the second post, I will explain why you should not really do it.

The timeout value you are looking is most likely the OperationTimeout on the OPC UA service level. There is no configurable property for it in QuickOPC. It is possible to change it but you must go quite deep. To do that, read opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...plication%20Configuration.html . In short, you need to create two XML config file AND change the value of the ConfigurationSources property.

For convenience, I am attaching the configuration file for OPC UA SDK that we are currently using inside QuickOPC. Look for <OperationTimeout> under <TransportQuotas>. Currently it is 120000 milliseconds (2 minutes).


File Attachment:

File Name: UAClientEn...1-19.xml
File Size:11 KB


Note that by shortening this timeout too much you can cause some otherwise correctly performing operations to appear failed.

Best regards
16 May 2017 14:39
Replied by support on topic Client.Write() Excepption, node size 19 000 Bytes

Client.Write() Excepption, node size 19 000 Bytes

Category: Reading, Writing, Subscriptions

OK, thank you.

I was looking into the size limitations in the meantime. I know the issue is now resolved, but for record, here are the current default transport quotas as used by QuickOPC 2016.2
<TransportQuotas>
 
    <!-- The default timeout in milliseconds for operations (used by clients) -->
    <OperationTimeout>120000</OperationTimeout>
 
    <!-- The maximum length for a string value in any message -->
    <MaxStringLength>1048576</MaxStringLength>
 
    <!-- 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-->
    <MaxArrayLength>65535</MaxArrayLength>
 
    <!-- The maximum size of any message -->
    <MaxMessageSize>4194304</MaxMessageSize>
 
    <!-- 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 -->
    <MaxBufferSize>65535</MaxBufferSize>
 
    <!-- 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 -->
    <ChannelLifetime>300000</ChannelLifetime>
 
    <!-- The lifetime of a SecurityToken in milliseconds.
         This specifies how long a security token can be used without renewal. -->
    <SecurityTokenLifetime>3600000</SecurityTokenLifetime>
  </TransportQuotas>

I was about to write that they are unlikely to be a problem, because they are relatively big.
Best regards
05 Nov 2016 17:17
Replied by support on topic Readfunction gets stuck after disconnection

Readfunction gets stuck after disconnection

Category: Connection, Reconnections, Certificates

In OPC UA the timeout parameters are different (in fact, the original question was about UA, but the answer somehow diverted form that).

The main issue here is, whether the function is truly blocked "for ever" (which would be an incorrect behavior on QuickOPC side), or whether it is just waiting very long on a long timeout (which would be working as designed). The longest timeout it is there is actually 10 minutes, and is called OperationTimeout.

Please have a look here: www.opclabs.com/forum/search?query=operationtimeout&childforums=1

Changing the OperationTimeout is a bit involved, but the necessary steps are described in the Concepts.
23 Mar 2016 08:48
Replied by support on topic Call to SubscribeMultipleMonitoredItems(..) stalls when OPC server is unavailable for more than ~1 minute

Cleaning of the apartment All this is well suited to my kitchen. It will look good in my apartment.

Category: Reading, Writing, Subscriptions

Hello.

Tables in the following documents list the various timeouts, and where to configure them:

File Attachment:

File Name: QuickOPC-U...0322.pdf
File Size:319 KB

File Attachment:

File Name: EasyUAClie...0322.pdf
File Size:323 KB


Most parameters can be set directly from the code. The OperationTimeout - which you may not need to change - depends on which one(s) you are getting - is a lower-level parameter that needs a more complicated approach. Please read the Concepts document, section Advanced Topics, chapter Application Configuration. For convenience, below is the "built-in" configuration used; you can use that one and just modify the item(s) that you want change.

File Attachment:

File Name: UAClientEn...nfig.xml
File Size:4 KB


Best regards
Displaying 1 - 13 out of 13 results.
Time to create page: 0.767 seconds

      

 Recommend this on Google