Skip to content
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

disable timeout_keep_alive: fixes #10625 #10510 #10474 #10635

Merged
merged 1 commit into from
May 22, 2023

Conversation

montyanderson
Copy link
Contributor

@montyanderson montyanderson commented May 22, 2023

This fix disables uvicorn's timeout_keep_alive option, replacing the default value of 5 with 0.

Additional notes and description of your changes

We encountered a lot of errors where generations were being prematurely errored, when used through the API.

This fix is based off the comment posted on #10625

@montyanderson montyanderson marked this pull request as ready for review May 22, 2023 14:56
@montyanderson montyanderson changed the title disable timeout_keep_alive: fixes #10625, #10510, #10474 disable timeout_keep_alive: fixes #10625 #10510 #10474 May 22, 2023
@AUTOMATIC1111 AUTOMATIC1111 changed the base branch from master to dev May 22, 2023 19:17
@AUTOMATIC1111 AUTOMATIC1111 merged commit d77ba18 into AUTOMATIC1111:dev May 22, 2023
@wzgrx
Copy link
Contributor

wzgrx commented May 24, 2023

This problem still exists

LocalProtocolError: Can't send data when our state is ERROR

ERROR: Exception in ASGI application
Traceback (most recent call last):
File "D:\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 428, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "D:\stable-diffusion-webui\venv\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 78, in call
return await self.app(scope, receive, send)
File "D:\stable-diffusion-webui\venv\lib\site-packages\fastapi\applications.py", line 273, in call
await super().call(scope, receive, send)
File "D:\stable-diffusion-webui\venv\lib\site-packages\starlette\applications.py", line 122, in call
await self.middleware_stack(scope, receive, send)
File "D:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 184, in call
raise exc
File "D:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 162, in call
await self.app(scope, receive, _send)
File "D:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 109, in call
await response(scope, receive, send)
File "D:\stable-diffusion-webui\venv\lib\site-packages\starlette\responses.py", line 270, in call
async with anyio.create_task_group() as task_group:
File "D:\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 662, in aexit
raise exceptions[0]
File "D:\stable-diffusion-webui\venv\lib\site-packages\starlette\responses.py", line 273, in wrap
await func()
File "D:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 134, in stream_response
return await super().stream_response(send)
File "D:\stable-diffusion-webui\venv\lib\site-packages\starlette\responses.py", line 255, in stream_response
await send(
File "D:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 159, in _send
await send(message)
File "D:\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 512, in send
output = self.conn.send(event)
File "D:\stable-diffusion-webui\venv\lib\site-packages\h11_connection.py", line 468, in send
data_list = self.send_with_data_passthrough(event)
File "D:\stable-diffusion-webui\venv\lib\site-packages\h11_connection.py", line 483, in send_with_data_passthrough
raise LocalProtocolError("Can't send data when our state is ERROR")
h11._util.LocalProtocolError: Can't send data when our state is ERROR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants