AsyncConnectionPool Connection Timeout with Semantic Kernel PostgresSettings #12655
Replies: 2 comments 2 replies
-
Tagging @eavanvalkenburg. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Closing as we're tracking the attached issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem Description
Hello Everyone,
I'm experiencing connection timeout issues when trying to initialise an async PostgreSQL connection pool using Python Semantic Kernel's
PostgresSettings.create_connection_pool()
method, from Postrgres Connector The sync version works perfectly, but the async version consistently fails with timeout errors.Environment
Error Messages
Code Setup
Working Sync Version (psycopg2)
Failing Async Version (Semantic Kernel)
Connection String Testing Results
I've tested different connection string formats:
postgresql+asyncpg://user:pass@host:port/db
→ "Error creating connection pool"asyncpg://user:pass@host:port/db
→ "Error creating connection pool"postgresql://user:pass@host:port/db
→ "couldn't get a connection after 30.00 sec"PostgreSQL Configuration Verified
✅ PostgreSQL is running and accessible:
psql
command line access works✅ PostgreSQL config appears correct:
listen_addresses = '*'
in postgresql.confHypothesis
Based on psycopg issue #370, I suspect this might be related to the AsyncConnectionPool's reconnection timeout behaviour. The pool may be:
reconnect_timeout
(default 300s, but timing out at 30s)Questions
PostgresSettings
?PostgresSettings.create_connection_pool()
have specific requirements or limitations?psycopg[pool]
?create_connection_pool()
method?Attempted Solutions
Request for Help
I'd appreciate guidance on:
Additional Context
The fact that the synchronous version works perfectly suggests this isn't a PostgreSQL server configuration issue, but rather something specific to the async connection pool implementation or configuration.
Any insights or suggestions would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions