lm-sys / lm-sys/FastChat

由于项目长时间不间断运行,导致调接口出现错误"Broken pipe"

Open
#3,689 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
39.5k
Forks
4.8k
PR merge metrics
No merged PRs in 30d

Description

我遇到一个偶现问题,在本项目长时间运行的时候不会有什么问题,大约运行了1-2个月没有暂停本项目。在这两个月的时间内,这个接口最大能承受100个并发,并且不会爆显存,但是在大约两个月之后突然发送一个请求返回“200OK“后出现了报错,这个报错之后必须强制关闭本项目并且重启才能得以解决!!

我认为,应该不会出现这种需要人工强制关闭重启才能解决的问题,问题截图和相关报错在下面,欢迎解决和讨论!!

Image

Image

2025-02-19 17:25:31 | ERROR | stderr | ERROR: Traceback (most recent call last): 2025-02-19 17:25:31 | ERROR | stderr | File "/root/miniconda3/envs/fastchat/lib/python3.10/asyncio/runners.py", line 44, in run 2025-02-19 17:25:31 | ERROR | stderr | return loop.run_until_complete(main) 2025-02-19 17:25:31 | ERROR | stderr | File "uvloop/loop.pyx", line 1515, in uvloop.loop.Loop.run_until_complete 2025-02-19 17:25:31 | ERROR | stderr | RuntimeError: Event loop stopped before Future completed. 2025-02-19 17:25:31 | ERROR | stderr | 2025-02-19 17:25:31 | ERROR | stderr | During handling of the above exception, another exception occurred: 2025-02-19 17:25:31 | ERROR | stderr | 2025-02-19 17:25:31 | ERROR | stderr | Traceback (most recent call last): 2025-02-19 17:25:31 | ERROR | stderr | File "/root/miniconda3/envs/fastchat/lib/python3.10/site-packages/starlette/routing.py", line 700, in lifespan 2025-02-19 17:25:31 | ERROR | stderr | await receive() 2025-02-19 17:25:31 | ERROR | stderr | File "/root/miniconda3/envs/fastchat/lib/python3.10/site-packages/uvicorn/lifespan/on.py", line 137, in receive 2025-02-19 17:25:31 | ERROR | stderr | return await self.receive_queue.get() 2025-02-19 17:25:31 | ERROR | stderr | File "/root/miniconda3/envs/fastchat/lib/python3.10/asyncio/queues.py", line 159, in get 2025-02-19 17:25:31 | ERROR | stderr | await getter 2025-02-19 17:25:31 | ERROR | stderr | asyncio.exceptions.CancelledError

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the reported traceback across asyncio/runners.py, uvloop/loop.pyx, starlette/routing.py, and uvicorn/lifespan/on.py, then inspect the project's API serving entry point. Reproduce the failure during long-running operation and determine why the event loop stops after the Broken pipe error. Done means the cause is identified and the service no longer requires a forced restart.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.