Skip to content

Commit c66ff38

Browse files
authored
Fix random port in use error even though already have free port detection (#970)
1 parent ba35062 commit c66ff38

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

slime/ray/rollout.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,8 @@ def _allocate_rollout_engine_addr_and_ports_normal(*, args, num_engines, rollout
395395

396396
def get_addr_and_ports():
397397
# use small ports to prevent ephemeral port between 32768 and 65536.
398-
start_port = 10000
398+
# also, ray uses port 10002-19999, thus we avoid near-10002 to avoid racing condition
399+
start_port = 15000
399400

400401
def port(consecutive=1):
401402
nonlocal start_port

0 commit comments

Comments
 (0)