[PR #5315] [Engine] Exclude queue time from the execution watchdog #5382

Open
opened 2026-11-07 16:34:48 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/5315
Author: @vvsotnikov
Created: 11/5/2026
Status: 🔄 Open

Base: main ← Head: fix/deepseek-queued-watchdog


📝 Commits (1)

  • 867561e fix(serve): wait for a free engine slot before sending requests

📊 Changes

2 files changed (+408 additions, -20 deletions)

View changed files

📝 serve/server.py (+59 -20)
➕ serve/test_ds_admission.py (+349 -0)

📄 Description

Queued requests can time out incorrectly, causing the server to stop the engine and abort running requests. This happens with DeepSeek --parallel because the server applies the timeout for running requests before queued requests start.

Queued requests now wait in Python until an execution slot is free. The server uses the parallel limit reported by the engine to control how many requests it sends. Queue deadlines and cancellation still apply while requests wait, and the existing timeout applies after the server sends a request.

The regression tests confirmed that queued requests can wait beyond the timeout while running requests continue to produce output. They also confirmed that timeouts still stop the engine when a running request produces no output.

Validation on commit 867561e:

  • One test failed in the full Linux serving suite; 1,450 passed and 14 were skipped. The failure in serve.test_keepawake concerns a short mock request that can finish before the keep-awake thread runs. A controlled test reproduced the same failure on this commit and base 9f7d977.
  • All five requests completed in the GPU test, and the native engine process stayed alive. The test used DeepSeek V4.1 Flash on two RTX A6000 GPUs, with --parallel 4 and engine_silence_s=5. Four requests each generated 384 tokens, while a fifth returned its first token 16.44 seconds after submission.
  • Six tokenizer tests passed when run with the model pack after the full suite had skipped them.
  • tools/minimal_server_smoke.py passed 57 tests and skipped four Windows-specific tests, with only runtime dependencies installed.

The CPU tests used unmodified PR source, while the GPU test included separate HTTP compatibility patches.

Run the added regression tests with:

python -m unittest serve.test_ds_admission -v

Run the full serving suite with:

python -m unittest discover -s serve -p 'test_*.py' -t . -v

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/5315 **Author:** [@vvsotnikov](https://github.com/vvsotnikov) **Created:** 11/5/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/deepseek-queued-watchdog` --- ### 📝 Commits (1) - [`867561e`](https://github.com/Niko1221/Strata/commit/867561e514a54896153e42e9d57ec490a7448fbe) fix(serve): wait for a free engine slot before sending requests ### 📊 Changes **2 files changed** (+408 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `serve/server.py` (+59 -20) ➕ `serve/test_ds_admission.py` (+349 -0) </details> ### 📄 Description Queued requests can time out incorrectly, causing the server to stop the engine and abort running requests. This happens with DeepSeek `--parallel` because the server applies the timeout for running requests before queued requests start. Queued requests now wait in Python until an execution slot is free. The server uses the parallel limit reported by the engine to control how many requests it sends. Queue deadlines and cancellation still apply while requests wait, and the existing timeout applies after the server sends a request. The regression tests confirmed that queued requests can wait beyond the timeout while running requests continue to produce output. They also confirmed that timeouts still stop the engine when a running request produces no output. Validation on commit `867561e`: - One test failed in the full Linux serving suite; 1,450 passed and 14 were skipped. The failure in `serve.test_keepawake` concerns a short mock request that can finish before the keep-awake thread runs. A controlled test reproduced the same failure on this commit and base `9f7d977`. - All five requests completed in the GPU test, and the native engine process stayed alive. The test used DeepSeek V4.1 Flash on two RTX A6000 GPUs, with `--parallel 4` and `engine_silence_s=5`. Four requests each generated 384 tokens, while a fifth returned its first token 16.44 seconds after submission. - Six tokenizer tests passed when run with the model pack after the full suite had skipped them. - `tools/minimal_server_smoke.py` passed 57 tests and skipped four Windows-specific tests, with only runtime dependencies installed. The CPU tests used unmodified PR source, while the GPU test included separate HTTP compatibility patches. Run the added regression tests with: ```sh python -m unittest serve.test_ds_admission -v ``` Run the full serving suite with: ```sh python -m unittest discover -s serve -p 'test_*.py' -t . -v ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#5382
No description provided.