adk-python icon indicating copy to clipboard operation
adk-python copied to clipboard

Error with session service when Double Texting on CloudRun

Open jimcsng opened this issue 1 year ago • 11 comments

** Please make sure you read the contribution guide and file the issues in the right place. ** Contribution guide.

Describe the bug When deployed to Cloud Run with MySQL database as the session store, the ADK app encountered issues when the end user double texts, i.e. the user sends multiple messages while the agent is thinking.

There is not encountered when it is locally deployed using in memory session.

To Reproduce

  1. Deploy the ADK agent to Cloud Run
  2. Configure to use the MySQL Session Store
  3. Sends multiple messages while the agent is thinking

Expected behavior The agent handles the messages one by one in order without errors

Logs Traceback (most recent call last):\n File "/usr/local/lib/python3.13/site-packages/google/adk/cli/fast_api.py", line 697, in event_generator\n async for event in runner.run_async(

ERROR:google_adk.google.adk.cli.fast_api:Error in event_generator: The last_update_time provided in the session object '2025-05-30 08:19:13' is earlier than the update_time in the storage_session '2025-05-30 08:19:14'. Please check if it is a stale session.

Desktop (please complete the following information):

  • Platform: Cloud Run
  • Python version(python -V): 3.11.12
  • ADK version(pip show google-adk): 1.0

jimcsng avatar May 30 '25 09:05 jimcsng

Any updates on this issue? My user needs to chat with multiple messages while the model is still thinking.

hung12ct avatar Aug 21 '25 02:08 hung12ct

same issue with version google-adk 1.13

magarafael avatar Aug 28 '25 14:08 magarafael

same issue with version google-adk 1.13

+1, same issue here.

mengjiaowang avatar Sep 09 '25 15:09 mengjiaowang

+1, same issue here.

hugohiroshi92 avatar Oct 08 '25 20:10 hugohiroshi92

We are taking a look.

hangfei avatar Nov 08 '25 03:11 hangfei

+1, same issue here. python adk:1.18.0

growmuye avatar Dec 08 '25 07:12 growmuye

Hello,

We recommend testing with latest version i.e. google-adk==1.21.0 and check if it is resolved or not.

llalitkumarrr avatar Jan 08 '26 09:01 llalitkumarrr

This issue has been automatically marked as stale because it has not had recent activity for 7 days after a maintainer requested clarification. It will be closed if no further activity occurs within 7 days.

adk-bot avatar Jan 16 '26 06:01 adk-bot

I'm still getting the "stale session" error on ADK v1.22.0. See my comment here: https://github.com/google/adk-python/issues/3717#issuecomment-3765434425

ilbertt avatar Jan 18 '26 16:01 ilbertt

Hello @GWeale ,

Could you please find some time to have a look at this and share your inputs?

llalitkumarrr avatar Feb 02 '26 15:02 llalitkumarrr

Yes, looking into now thank you for the detail

GWeale avatar Feb 07 '26 00:02 GWeale