ResInsight icon indicating copy to clipboard operation
ResInsight copied to clipboard

Python: Multiple resinsight instances can be given identical port number

Open magnesj opened this issue 3 years ago • 0 comments

When starting a new resinsight instance from Python, the rips module will start at the default port number and iterate until an available port number is found using socket commands that takes some time. When a port number is found, resinsight is started and given the available port number as a parameter. The resinsight application will start, and a socket communication will be created on local machine. If multiple processes does this at the same time, we often end up with multiple resinsight instances with the same port numbers causing unintended side effects.

We need a way to reserve a certain port number up front before trying to launch the resinsight process.

Reference documentation https://stackoverflow.com/questions/6920858/interprocess-communication-in-python

magnesj avatar Sep 21 '22 11:09 magnesj