Replies: 5 comments 3 replies
-
you need to ensure your queue consumers to be at equal priority so both will get the chance to process a item! |
Beta Was this translation helpful? Give feedback.
-
if you are overloading your CPU or not releasing the loop often enough you can get whatever strange issues. And yes what you describe is typical |
Beta Was this translation helpful? Give feedback.
-
My consuming code look like this. The send methods are transmitting data to an iot platform. How to check if I have enough free time in the main loop. CPU util is at 40%. 20% with only one subscription.
The event queue receives about 100 messages / second. |
Beta Was this translation helpful? Give feedback.
-
I also made some tests without sending the data to the iot platform. But the behaviour is the same. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the help. After disabling the transmission to the iot platform and decreasing the await asyncio.sleep(0.1) to await asyncio.sleep(0.01) brings the expected result. This is a clear indication that the data transmission needs to much time and blocks the opcua processing. Currently i use paho-mqtt for the data transmission. I will now switch to asyncio-mqtt. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm capturing data from a Siemens WinCC server.
The alarm messages from the WinCC server are captured by subscribe_alarms_and_conditions.
Some status words of components are captured by subscribe_data_change.
Both handlers are writing the captured data to different asyncio.Queue(s).
If I run the data capturing of subscribe_alarms_and_conditions and subscribe_data_change in two separat procesess, the data capturing runs fine and looks well synchronized.
If I run both in one process it looks also fine at the beginning but than step by step the subscription with the higher load becomes dominant and after some time I got no information from the subscription with the lower load.
Any idea if this behaviour could be caused by the opcua-asyncio library?
Beta Was this translation helpful? Give feedback.
All reactions