Skip to content

Fixed SSE request not getting canceled and getting SSE stuck #2806

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

Merged

Conversation

RunDevelopment
Copy link
Member

So I discovered an interesting bug: closing a setting doesn't also close currently running requests. This has the effect that our resp.content.iter_chunks() for our SSE requests just gets stuck and halts forever. This is a problem, because we sometimes restart the worker to kill the current execution. When this bug occurs, the worker will restart and execute chains just fine, but no SSE events will reach the frontend. So no progress updates and broadcasts.

I fixed this by manually keeping track of open SSE forward requests and closing them when the worker stops. This causes the SSE forwards to reset properly.

@joeyballentine joeyballentine merged commit 43473c7 into chaiNNer-org:main Apr 19, 2024
@RunDevelopment RunDevelopment deleted the SSE-STUCK-SSE-STUCK branch April 19, 2024 18:44
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.

2 participants