You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upgrading to the latest Go AppEngine runtime (which has an embedded copy of this code) put us into a code path that uses port_picker to select an open port number, which is then passed off to the Go subprocess to bind. Since the upgrade, we've seen a large number of both CI failures and local dev failures stemming from the Go process being unable to bind the port that the python code is asking it to bind.
Digging into the portpicker code, I'm curious why it tries random ports in the 15000-25000 range rather than just letting the OS pick a free port? My understanding is that letting the OS assign a free port would interoperate better with other (non-Python) processes random binding port 0, since the OS will try to ensure that successive port 0 binds don't conflict with each other.