[router] make error actionable (#3063)

This commit is contained in:
Byron Hsu
2025-01-22 17:56:21 -08:00
committed by GitHub
parent c0bf9bf15c
commit 5de50653cd

View File

@@ -238,12 +238,12 @@ impl Router {
loop { loop {
if start_time.elapsed() > Duration::from_secs(timeout_secs) { if start_time.elapsed() > Duration::from_secs(timeout_secs) {
error!( error!(
"Timeout {}s waiting for workers to become healthy", "Timeout {}s waiting for workers {:?} to become healthy. Please set --router-worker-startup-timeout-secs (sglang_router.launch_server) or --worker-startup-timeout-secs (sglang_worker.router) to a larger value",
timeout_secs timeout_secs, worker_urls
); );
return Err(format!( return Err(format!(
"Timeout {}s waiting for workers to become healthy", "Timeout {}s waiting for workers {:?} to become healthy. Please set --router-worker-startup-timeout-secs (sglang_router.launch_server) or --worker-startup-timeout-secs (sglang_worker.router) to a larger value",
timeout_secs timeout_secs, worker_urls
)); ));
} }
@@ -644,11 +644,11 @@ impl Router {
loop { loop {
if start_time.elapsed() > Duration::from_secs(timeout_secs) { if start_time.elapsed() > Duration::from_secs(timeout_secs) {
error!( error!(
"Timeout {}s waiting for worker {} to become healthy", "Timeout {}s waiting for worker {} to become healthy. Please set --router-worker-startup-timeout-secs (sglang_router.launch_server) or --worker-startup-timeout-secs (sglang_worker.router) to a larger value",
timeout_secs, worker_url timeout_secs, worker_url
); );
return Err(format!( return Err(format!(
"Timeout {}s waiting for worker {} to become healthy", "Timeout {}s waiting for worker {} to become healthy. Please set --router-worker-startup-timeout-secs (sglang_router.launch_server) or --worker-startup-timeout-secs (sglang_worker.router) to a larger value",
timeout_secs, worker_url timeout_secs, worker_url
)); ));
} }