Session Management using WEB UI on Cloud Run #1148
Unanswered
eliamazzon
asked this question in
Q&A
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I’m encountering some issues with deploying agent systems built with Google ADK (Python) on Cloud Run, following the guide in the docs and using the gcloud CLI.
Here’s the setup:
I’m using the SERVE_WEB_INTERFACE = True option. A SESSION_DB_URL is provided, pointing to a Cloud SQL instance for session storage.
The web UI is accessible, but I’m facing two main problems:
1 - The Cloud SQL database remains empty, and sessions are lost whenever the Cloud Run instance restarts.
2 - Multiple users accessing the web UI can see each other's sessions. The agent behaves unpredictably, as if all users are interacting within the same session.
It seems that DatabaseSessionService fails, and the system falls back to InMemorySessionService, which I believe isn’t designed to handle concurrent users properly.
I have two questions:
When using DatabaseSessionService with the web UI, does it properly differentiate between various browsers or tabs to keep sessions separate?
Is there a specific schema setup required in the database for session storage, or is it managed entirely by the library? If it’s the latter, any ideas why this might not be working in my case?
Did anyone succeed in deploying the agents for multiple users using Cloud Run?
Thanks in advance for any guidance or pointers to resources that could help.
Beta Was this translation helpful? Give feedback.
All reactions