-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ISSUE] API请求无法并行处理多个,服务器端总是一个处理完才处理下一个 #124
Comments
无法复现,可以提供更多信息吗?运行环境、代码版本、请求参数 |
我使用上面的代码进行的测试,在单独deploy 一个API 后,每次generate_audio_batch 都在执行完后才处理下一个任务 |
调用launch.py 启动的API也是一样的,可以同时发送两个以上的请求,并观察终端的tqdm 记录,即可发现同一时刻仅支持一个任务处理 |
不太清楚你这个代码是怎么调用的,如果是在同一个线程里调用,那你遇到的同步生成的现象就是预期的结果,同一个worker里生成过程是锁住的 launch.py 的完整启动参数是什么? 要测试的话最简单的方法直接用浏览器开两个请求 /tts 的链接(或者同时开两个playground页面),请求结果可以大概一起返回基本就是并行了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
确认清单
你的issues
python launch.py --port 9003 --preload_models --lru_size 0 --workers 2
且多个worker的情况下,也无法并行处理,他们处理的是同一个请求
The text was updated successfully, but these errors were encountered: