Professional OPC
Development Tools

logos

Creating multiple EasyDAClient objects, blocking

More
09 Apr 2018 17:11 #6217 by mpp
So, if you create two clients, according to the first sentence, it blocks; according to the second sentence, it does not block. Can you clarify? Or does it have to do with the fact *where* you create them? (in the main function, versus the threads?)

Yes, my intention was to say that if I create two clients in the main function then the application wont' block when creating the other 12.

And ok, I'll give a try to the last release

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

More
09 Apr 2018 16:53 #6216 by support
Hello,

I do not understand how the following two statements can go together:
"The console application blocks at the constructor call of the second client."
"The strange fact is that if I create two (not one, two) clients in the program's main function then the application won't block.".

So, if you create two clients, according to the first sentence, it blocks; according to the second sentence, it does not block. Can you clarify? Or does it have to do with the fact *where* you create them? (in the main function, versus the threads?)

There was no fix to specifically address this issue, because, in general, we can only fix issues that we can reproduce. But we do not provide fixes for earlier versions, so the first thing to do would be to try the behavior with the newest version (2018.1). If that fixes the problem and you are not covered by the maintenance, I can give you an additional discount towards purchasing an upgrade. If using 2018.1 does not fix it, I would ask you to kindly try to put together an example that we can run on our side and that shows the problematic behavior.

Best regards

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

More
09 Apr 2018 15:16 #6214 by mpp
Hi, I'm experiencing the same problem. Or similar at least.

I have 12 xml files with the paramteters for my application. A couple of such files have more than 1000 parameters.
I deserialize them with different threads and try to create an OPC Client for each file.

The console application blocks at the constructor call of the second client.

The strange fact is that if I create two (not one, two) clients in the program's main function then the application won't block.

I'm using the version 5.35. Was it solved in a newer release?

Thanks

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

More
29 Jul 2016 08:14 #4285 by lkostic
Thanks, I will try to implement Easy DA client according to yours instruction.
I will inform next week if that passed.

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

More
26 Jul 2016 18:08 #4266 by support
Thank you.

This sounds similar to the problem I have described earlier. I think we should try some workarounds.

Can you pre-create the objects in the main thread, and then just use them? EasyDAClient allows
that.

Or, based on how you have described your needs, why don't you just create one EasyDAClient instance and use it in all threads? That is also allowed.

Best regards

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

More
26 Jul 2016 09:39 #4261 by lkostic
The first creation of EastDAClient is always good. Some of later creation is making this problem. There is no rule which one (2nd, 3rd, 16th, 99th...). Then I have to restart my application, repeat the process and then it passes.
When the problem occurs, the entire application is stuck until it is restarted. One time we waited few hours before restart the application. Always the same behavior.

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

More
26 Jul 2016 09:03 #4260 by support
Can you describe what precisely happens? Does the first creation of EasyDAClient block? Or does the second block? Or some subsequent creation? If it does, does it block forever, or does it just take very long time? Is the behavior always precisely the same, or are there variations?

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

More
26 Jul 2016 08:13 #4259 by lkostic
Hello,
Our backend is Windows service, which also hosts web-services so they run in separate thread, so considering threads, we are creating separate thread for each EasyDAClient.

But since using creating of EasyDAClient for service call which requires writing the data to OPC, and this is key operation in our system, whole system is made so there is only one of this operations running (like SingleCall) so there is no case we are calling two or more services at the same time (also confirmed by our logs).

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

More
26 Jul 2016 07:51 #4258 by lkostic
Hello,
Our backend is Windows service, which also hosts web-services so they run in separate thread, so considering threads, we are creating separate thread for each EasyDAClient.

But since using creating of EasyDAClient for service call which requires writing the data to OPC, and this is key operation in our system, whole system is made so there is only one of this operations running (like SingleCall) so there is no case we are calling two or more services at the same time (also confirmed by our logs).

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

More
26 Jul 2016 07:41 #4257 by lkostic
Hello,
Our backend is Windows service, which also hosts web-services so they run in separate thread, so considering threads, we are creating separate thread for each EasyDAClient.

But since using creating of EasyDAClient for service call which requires writing the data to OPC, and this is key operation in our system, whole system is made so there is only one of this operations running (like SingleCall) so there is no case we are calling two or more services at the same time (also confirmed by our logs).

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

Moderators: support
Time to create page: 0.244 seconds

      

 Recommend this on Google