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.
- Forum
- Discussions
- QuickOPC-Classic in COM
- Connections, Reconnections, COM/DCOM
- State that causes the ReadItem to block indefinitely
State that causes the ReadItem to block indefinitely
Whether or not the sync approach poses a scalability problems depends on how the whole system is set up. For example, if you are the only (or the main) OPC client to the server, and you are simply calling our EasyDAClient.ReadXXXX methods on a single non-isolated instance of the component, there won't be any harm doing OPC sync. Async will start showing its advantages (possibly) when there are more OPC clients (depends on the OPC server implementation, though), or when you are hitting the server by multiple operations from parallel threads in the same clients.
Please Log in or Create an account to join the conversation.
This appears to have resolved the issue. Running in Synchronous mode isn't causing the server_runtime.exe process to begin blocking.
Do you have any idea why using Async could be causing our issue? This application needs to be scalable and I'm concerned with having this defaulted to Sync.
Please Log in or Create an account to join the conversation.
Setting the desired read/write method to asynchronous does not harm. But it truly has an effect only when both sync and async are enabled: in such case, it dictates the preference (for example, in the default setting both are enabled, and the desired is async, so normally async is chose, but if we detect that async is not available for whatever reason form the server, then still the sync can be chosen, because it's also enabled).
When only one from sync/async is enabled, then that one is always chosen.
Please Log in or Create an account to join the conversation.
Just to note, I changed Desired read/write from Asynchronus to Synchronous. I assumed since I unchecked allowing async, I should changed the desired method as well.
I provided a process dump of the server_runtime.exe and at first glance they haven't noticed any issues yet. They believe the root of the issue may be in the RPC layer.
Please Log in or Create an account to join the conversation.
Best regards
Please Log in or Create an account to join the conversation.
Like I mentioned before, I was able to recover by ending the server_runtime.exe process.
Please Log in or Create an account to join the conversation.
My previous questions were based on a different theory, and I will now return it. The fact that the Kepware server cannot be shut down may be due to a call blocked in a reverse direction: A callback from the server to the client component may be blocked inside the component (that should, of course, not happen if all works well). So I was about to propose to try something and see if it works as a workaround: Get rid of the callbacks. They basically happen for two reasons: subscriptions, and asynchronous operations. By default, even if you do not explicitly subscribe, EasyDAClient creates internal subscriptions. So we must turn that off. And, again by default, the Reads and Writes are performed using asynchronous variants of these OPC methods. So we must turn that off as well.
Can you please try this:
- Run the EasyOPCOptions utility.
- On the "OPC-DA Defaults" tab, under "Client Mode" group, uncheck "Allowed read/write methods: Asynchronous", (and only leave "Synchronous").
- On the same tab, under "Update Rates", uncheck the box next to "Automatic - after read", so that the edit box turns to read "infinite".
- Restart the component's process/service after the changes.
Thank you, and best regards
Please Log in or Create an account to join the conversation.
Next time this occurs, I'm going to try to step through it when it isn't working to try to find the exact line and call that is stopping further execution.
That is what I find interesting about this as well. Typically the web request should time out after 30 seconds of no response. However, this never seems to timeout.
I'm going to go into apache and double check the timeout that is set. So you think that you may be waiting for Kepware to respond with something? But shouldn't it timeout after 10 seconds if Kepware doesn't respond?
-Doug
Please Log in or Create an account to join the conversation.
Are you sure that you have seen a blocking that is significantly longer than that? If there is e.g. a Web server request processing timeout and is shorter, then the request processing might be terminated before we get a chance to return.
With your recent findings, something like this becomes more likely. If terminating the server leads to "unblocking", it means that we were waiting for something to complete in the server.
Please Log in or Create an account to join the conversation.
I have everything in try catches where the catch logs to the event log with an exception but I'm not getting any information back when this happens making it very difficult to diagnose.
Our customer is currently down now due to this issue and I need to track down where this is originating.
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-Classic in COM
- Connections, Reconnections, COM/DCOM
- State that causes the ReadItem to block indefinitely