Find answers from the community

Updated 9 months ago

SSL + Async Postgres

Experiencing some odd behavior with PostgresDocumentStore (deployed to aws aurora serverless v2). We've added support for the SSL parameters "sslmode," "sslcert," "sslkey," and "sslrootcert." Synchronous calls with SSL work great. Asynchronous calls without SSL, also work great. Async + SSL produces an error "ConnectionDoesNotExist: Future not awaited-connection closed mid operation." What is confusing, is that this error only happens when trying to run aretrieve aget_nodes and adelete. Whereas aquery achat and aretrieve (recursive retriever) all work fine. The fact that some of these calls work leads me to believe it's not an SSL issue.
C
3 comments
Unfortunately I can't upload a stack trace due to company policy
Apparently this is an issue with using asyncpg to connect to RDS via IAM. Seeing some people say they've had success with psycopg3 instead.
Can confirm psycopg3 + sqlalchemy + ssl + IAM + RDS/Aurora does indeed work
Add a reply
Sign up and join the conversation on Discord