The connection to vllm is not released. #19192

Closed
opened 2026-02-21 19:56:51 -05:00 by yindo · 0 comments
Owner

Originally created by @shenxf1205 on GitHub (Oct 13, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.6.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

The workflow has configured vllm, and multiple concurrent calls to the workflow are made through the API.

✔️ Expected Behavior

After the API call workflow is completed, the connection to access the vllm large model is also released simultaneously.

Actual Behavior

Hi everyone,
I'm encountering an issue with connection persistence when using Dify's API to make multiple concurrent workflow calls to a vllm large model. After the calls complete, I can still observe in the vllm logs and network connections (via netstat) that the connections haven't been released. It takes half an hour or even longer for the connections to finally release on the vllm side, and during this period, Dify doesn't show any new request logs.
I'm wondering if there's a way to check which connections remain unreleased from the Dify side. The vllm logs only display connection counts without detailed request logs, as shown below:

(APIServer pid=923613) INFO 10-13 09:50:01 [loggers.py:123] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 63.0 tokens/s, Running: 3 reqs, Waiting: 0 reqs, GPU KV cache usage: 55.2%, Prefix cache hit rate: 62.8%(APIServer pid=923613) INFO 10-13 09:50:11 [loggers.py:123] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 62.7 tokens/s, Running: 3 reqs, Waiting: 0 reqs, GPU KV cache usage: 55.4%, Prefix cache hit rate: 62.9%(APIServer pid=923613) INFO 10-13 09:50:21 [loggers.py:123] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 62.7 tokens/s, Running: 3 reqs, Waiting: 0 reqs, GPU KV cache usage: 55.5%, Prefix cache hit rate: 62.9%(APIServer pid=923613) INFO 10-13 09:50:31 [loggers.py:123] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 62.7 tokens/s, Running: 3 reqs, Waiting: 0 reqs, GPU KV cache usage: 55.7%, Prefix cache hit rate: 62.9%(APIServer pid=923613) INFO 10-13 09:50:41 [loggers.py:123] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 62.4 tokens/s, Running: 3 reqs, Waiting: 0 reqs, GPU KV cache usage: 55.8%, Prefix cache hit rate: 62.9%(APIServer pid=923613) INFO 10-13 09:50:51 [loggers.py:123] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 62.7 tokens/s, Running: 3 reqs, Waiting: 0 reqs, GPU KV cache usage: 56.0%, Prefix cache hit rate: 62.9%

A normal request from vllm will display the request log. Any insights or guidance on troubleshooting this would be greatly appreciated. Thanks in advance for your help!

Originally created by @shenxf1205 on GitHub (Oct 13, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.6.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce The workflow has configured vllm, and multiple concurrent calls to the workflow are made through the API. ### ✔️ Expected Behavior After the API call workflow is completed, the connection to access the vllm large model is also released simultaneously. ### ❌ Actual Behavior Hi everyone, I'm encountering an issue with connection persistence when using Dify's API to make multiple concurrent workflow calls to a vllm large model. After the calls complete, I can still observe in the vllm logs and network connections (via netstat) that the connections haven't been released. It takes half an hour or even longer for the connections to finally release on the vllm side, and during this period, Dify doesn't show any new request logs. I'm wondering if there's a way to check which connections remain unreleased from the Dify side. The vllm logs only display connection counts without detailed request logs, as shown below: (APIServer pid=923613) INFO 10-13 09:50:01 [loggers.py:123] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 63.0 tokens/s, Running: 3 reqs, Waiting: 0 reqs, GPU KV cache usage: 55.2%, Prefix cache hit rate: 62.8%(APIServer pid=923613) INFO 10-13 09:50:11 [loggers.py:123] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 62.7 tokens/s, Running: 3 reqs, Waiting: 0 reqs, GPU KV cache usage: 55.4%, Prefix cache hit rate: 62.9%(APIServer pid=923613) INFO 10-13 09:50:21 [loggers.py:123] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 62.7 tokens/s, Running: 3 reqs, Waiting: 0 reqs, GPU KV cache usage: 55.5%, Prefix cache hit rate: 62.9%(APIServer pid=923613) INFO 10-13 09:50:31 [loggers.py:123] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 62.7 tokens/s, Running: 3 reqs, Waiting: 0 reqs, GPU KV cache usage: 55.7%, Prefix cache hit rate: 62.9%(APIServer pid=923613) INFO 10-13 09:50:41 [loggers.py:123] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 62.4 tokens/s, Running: 3 reqs, Waiting: 0 reqs, GPU KV cache usage: 55.8%, Prefix cache hit rate: 62.9%(APIServer pid=923613) INFO 10-13 09:50:51 [loggers.py:123] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 62.7 tokens/s, Running: 3 reqs, Waiting: 0 reqs, GPU KV cache usage: 56.0%, Prefix cache hit rate: 62.9% A normal request from vllm will display the request log. Any insights or guidance on troubleshooting this would be greatly appreciated. Thanks in advance for your help!
yindo added the 🐞 bug label 2026-02-21 19:56:51 -05:00
yindo closed this issue 2026-02-21 19:56:51 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#19192