[feat] add port conflict detection for cache-queue-port and engine-wor… #5135
+300
−28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
为提升系统在多组件并行启动场景下的稳定性,本 PR 新增了 cache-queue-port 与 engine-worker-queue-port 的端口冲突检测逻辑。当用户显式指定端口且端口已被占用时,系统将提前识别并快速失败及提示,避免在启动hang住,从而提升整体用户体验与可用性。
Modifications
cache-queue-port的端口可用性检查逻辑engine-worker-queue-port的端口可用性检查逻辑Command
当前服务启动时,可指定四类端口
python -m fastdeploy.entrypoints.openai.api_server \ --model /workspace/ERNIE-4.5-0.3B-Paddle \ --port 8680 \ --engine-worker-queue-port 8386 \ --cache-queue-port 8683 \ --metrics-port 8682 \端口冲突示例
Accuracy Tests
该改动不涉及模型推理逻辑或 kernel 修改,对模型精度无影响。
Checklist
pre-commit已通过