You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
greenlet_spawn has not been called; can't call await_only() here. Was IO attempted in an unexpected place? (Background on this error at: https://sqlalche.me/e/20/xd2s) #1276
I'm frustrated when trying to integrate the Google ADK DataBaseSessionServices with modern async Python web frameworks like FastAPI. The current session service implementations appear to be synchronous, which creates performance bottlenecks and blocking operations in async applications. This is particularly problematic when:
Building FastAPI applications that need to handle high concurrency
Integrating with async database operations using SQLAlchemy's async engine
Maintaining non-blocking I/O operations throughout the application stack
Scaling applications that require efficient resource utilization
I alway got this particular error while using DatabaseSessionService for Neon DB. greenlet_spawn has not been called; can't call await_only() here. Was IO attempted in an unexpected place? (Background on this error at: https://sqlalche.me/e/20/xd2s)
My solution:
I would like to see an AsyncDatabaseSessionService added to the Google ADK session services that provides:
Fully async/await compatible methods for all session operations:
async def create_session(...)
async def get_session(...)
async def list_sessions(...)
async def delete_session(...)
async def append_event(...)
Native async database support using:
SQLAlchemy's create_async_engine and AsyncSession
Proper async context managers for database connections
Non-blocking database operations throughout
Seamless FastAPI integration that allows developers to:
Use dependency injection with async session services
Maintain async context throughout request handling
Achieve optimal performance in high-concurrency scenarios
Backward compatibility with existing session service interfaces while extending them for async operations
Additional context
Framework Compatibility: This enhancement would make Google ADK more compatible with the modern Python async ecosystem, including:
Hi @zakisCodes and thanks to everyone who participated in this thread.
We're currently doing some housekeeping on our issue tracker. Given the rapid pace of development and the number of updates since this was last active, there's a good chance this issue has been resolved in a newer version. To help us keep our backlog focused on current issues, we are closing this as stale.
If you're still facing this problem, could you please update to the very latest version of the library and confirm the issue still exists? If it does, please comment here, and we will be happy to reopen this issue and investigate further.
Activity
klateefa commentedon Oct 8, 2025
Hi @zakisCodes and thanks to everyone who participated in this thread.
We're currently doing some housekeeping on our issue tracker. Given the rapid pace of development and the number of updates since this was last active, there's a good chance this issue has been resolved in a newer version. To help us keep our backlog focused on current issues, we are closing this as stale.
If you're still facing this problem, could you please update to the very latest version of the library and confirm the issue still exists? If it does, please comment here, and we will be happy to reopen this issue and investigate further.
Thanks for your contribution and understanding!