Professional OPC
Development Tools

logos

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.

Timeout error

More
05 May 2020 11:47 #8466 by support
Replied by support on topic Timeout error
Hello,

most likely the reason is in what the error says: the server did not respond in time to one of the calls needed to connect & perform the Read. It would be possible to tell precisely by capturing the communication in Wireshark ( kb.opclabs.com/Collecting_information_for_troubleshooting ).

Much less likely, this can be some bug in QuickOPC. If such suspection comes from the Wireshark analysis, first thing to do would be to re-test with latest QuickOPC, because we do not officially support version 5.51.

If all your code does is to make a read each 60 seconds, I would recommend to increase the "hold period". With the default settings, when the code does a Read in this way,
QuickOPC is setting up a session (connection) to the OPC server every time, then makes the Read, and then closes it. If you set the HoldPeriod to e.g. 120000 (millseconds), the session will stay connected (and perhaps the error might go away). See: opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...sionParameters~HoldPeriod.html .

Best regards

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

More
05 May 2020 08:44 - 05 May 2020 11:31 #8464 by chrisachern
Timeout error was created by chrisachern
Hello,

i have an simple service with an EasyUAClient version5.51.465.1.

There is a timer which reads value each 60seconds. The code looks like this.
private void Timer_Elapsed(object sender, ElapsedEventArgs e)
        {                   
                ValueResult[] result = EasyUAClient.ReadMultipleValues(UAReadArguments);           
 
                for (int i = 0; i < result.Length; i++)
                {
                    try
                    {
                        if (result[i].Succeeded && result[i].Exception == null && result[i].Value != null)
                        {
                           WriteToDB();
                        }
                    }
                    catch (Exception ex)
                    {
                        EventLog.WriteEntry("OPC_UAClient_Service", ex.Message, EventLogEntryType.Error);
                    }
                }
            }
        }
Sometimes after a while, i get the following error message and the service stops writing the values to the database. What can i do to solve the problem?

Timeout connecting the OPC-UA client session. The total timeout value was 60000 milliseconds, and we have waited for 0 milliseconds. The actual waiting time is lower than the total timeout (or even zero) if the connection operation has already started earlier.

Best Regards,
Chris
Last edit: 05 May 2020 11:31 by support. Reason: added code formatting

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

Moderators: support
Time to create page: 0.046 seconds