Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
263eab9f
"tutorials/models/vscode:/vscode.git/clone" did not exist on "2b9838697f3dacad7cd8a6c4fcd7489d53711729"
Unverified
Commit
263eab9f
authored
Oct 31, 2025
by
ishandhanani
Committed by
GitHub
Oct 31, 2025
Browse files
fix: dummy health check server not accessible on non-zero rank nodes (#12297)
parent
25257d8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
16 deletions
+30
-16
python/sglang/compile_deep_gemm.py
python/sglang/compile_deep_gemm.py
+13
-7
python/sglang/srt/utils/common.py
python/sglang/srt/utils/common.py
+17
-9
No files found.
python/sglang/compile_deep_gemm.py
View file @
263eab9f
...
@@ -104,15 +104,21 @@ def launch_server_process_and_send_one_request(
...
@@ -104,15 +104,21 @@ def launch_server_process_and_send_one_request(
if
response
.
status_code
==
200
:
if
response
.
status_code
==
200
:
# Rank-0 node send a request to sync with other node and then return.
# Rank-0 node send a request to sync with other node and then return.
if
server_args
.
node_rank
==
0
:
if
server_args
.
node_rank
==
0
:
payload
=
{
"input_ids"
:
[
0
,
1
,
2
,
3
],
"sampling_params"
:
{
"max_new_tokens"
:
8
,
"temperature"
:
0
,
},
}
# In PD mode, include fake bootstrap fields so workers don't assert
if
server_args
.
disaggregation_mode
!=
"null"
:
payload
[
"bootstrap_host"
]
=
FAKE_BOOTSTRAP_HOST
payload
[
"bootstrap_room"
]
=
0
response
=
requests
.
post
(
response
=
requests
.
post
(
f
"
{
base_url
}
/generate"
,
f
"
{
base_url
}
/generate"
,
json
=
{
json
=
payload
,
"input_ids"
:
[
0
,
1
,
2
,
3
],
"sampling_params"
:
{
"max_new_tokens"
:
8
,
"temperature"
:
0
,
},
},
timeout
=
600
,
timeout
=
600
,
)
)
if
response
.
status_code
!=
200
:
if
response
.
status_code
!=
200
:
...
...
python/sglang/srt/utils/common.py
View file @
263eab9f
...
@@ -2351,16 +2351,24 @@ def launch_dummy_health_check_server(host, port, enable_metrics):
...
@@ -2351,16 +2351,24 @@ def launch_dummy_health_check_server(host, port, enable_metrics):
)
)
server
=
uvicorn
.
Server
(
config
=
config
)
server
=
uvicorn
.
Server
(
config
=
config
)
try
:
# Run server in a background daemon thread with its own event loop
loop
=
asyncio
.
get_running_loop
()
# This prevents blocking the main thread while still serving health checks
logger
.
info
(
def
run_server
():
f
"Dummy health check server scheduled on existing loop at
{
host
}
:
{
port
}
"
try
:
)
asyncio
.
run
(
server
.
serve
())
loop
.
create_task
(
server
.
serve
())
except
Exception
as
e
:
logger
.
error
(
f
"Dummy health check server failed to start:
{
e
}
"
)
raise
finally
:
logger
.
info
(
f
"Dummy health check server stopped at
{
host
}
:
{
port
}
"
)
except
RuntimeError
:
thread
=
threading
.
Thread
(
logger
.
info
(
f
"Starting dummy health check server at
{
host
}
:
{
port
}
"
)
target
=
run_server
,
daemon
=
True
,
name
=
"health-check-server"
server
.
run
()
)
thread
.
start
()
logger
.
info
(
f
"Dummy health check server started in background thread at
{
host
}
:
{
port
}
"
)
def
create_checksum
(
directory
:
str
):
def
create_checksum
(
directory
:
str
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment