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

Unclosed client session error #593

Closed
beplay opened this issue Feb 6, 2024 · 3 comments
Closed

Unclosed client session error #593

beplay opened this issue Feb 6, 2024 · 3 comments

Comments

@beplay
Copy link
Contributor

beplay commented Feb 6, 2024

First of all, many thanks to @sarah-widder et al. for providing this sample, it helped us greatly to deploy a custom chat solution!

We merged the latest changes, especially the major refactoring that included an upgrade from Flask to Quart. While the changes seem to work, we now get an error when running the chat locally:

ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f822a653a90>

This message appears only when generating a response and not while e.g., loading/refreshing the web app:
image

This message seems to be generated by Quart, however without any references to where in the code this error is triggered. Not sure if this relates to the cosmos_conversation_client.cosmosdb_client.close() method not being called after e.g., an error? Or is Quart somehow not closing open ClientSessions although I could not find a reference in the code?

Any guidance is appreciated!

@Epstone
Copy link

Epstone commented Mar 28, 2024

Same problem here. After the update to #16be120 we see many of these entries in the log. Any ideas?
grafik

@Epstone
Copy link

Epstone commented Mar 28, 2024

The error is gone when cosmos db feature is deactivated. Potentitally something with my configuration. But indeed some log output may be missing on error.

@beplay
Copy link
Contributor Author

beplay commented Apr 25, 2024

Closing this thread and continuing in #751

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

No branches or pull requests

2 participants