Closed jla closed 4 years ago
Found it! There is a limit in the number of concurrent asynchronous operations in node, by default is four. Each call to the snap7 library use one of the four available threads. This could be a problem with multiple devices and bad network connection.
Setting the UV_THREADPOOL_SIZE environment variable to a higher number (pe. the total number of devices) solve the problem.
When connecting to multiple devices if some of them goes down it blocks all the communication with the other devices:
With LIMIT = 3 it works as expected:
I'm not sure if it's a problem in the Snap7 library. Any idea? Thanks!