#4015·puma

在优雅的工作进程关闭期间出现"无法在关闭时添加工作"错误

作者: kzwnjp创建于 2026年9月8日更新于 2026年9月9日

描述错误

当一个工作线程正常关闭时,Puma::ThreadPool#<<会引发RuntimeError: Unable to add work while shutting down。此错误在Server#process_client中没有被处理,因此client_error捕获了它,客户端收到 500。我们期望连接只是关闭。