Can the tracker recover conversations after a server restart?

I have a custom tracker store that persists conversations to CouchDB. The code can be found here: A Rasa tracker implementation for couchDB · GitHub

I can see conversations being stored in the database, and I can see from logs things working ok. I have a web-frontend based on chatroom repo (GitHub - digitalWestie/chatroom: React-based Chatroom Component for Rasa Stack) that I’m using as my frontend. When I refresh the page it fetches the tracker from the API endpoint and I can continue conversation.

So far so good. However, if I refresh the page after restarting the rasa server then it seems to restart the conversation from scratch. I can see from the database the tracker has been completely reset from the beginning.

My guess is this behaviour is down to way the lock store works. What I’d like to happen is for my conversations to be picked up by the server after it has been restarted. I can understand this might make sense if I had lots of instances running for load balancing purposes, but in my case I’d just like to run the one server. Can anyone advise?

Update- I tried using the Redis lock store instead of the memory lock store. No change in behaviour…

I see that it’s possible for sessions to expire as a result of my Session configuration# - in my case I have session_expiration_time set to 0 so that sessions do not expire.

Looking through the code, the two conditions that dictate a new session are whether the tracker has any events, or whether the session has expired -

It seems like either my configuration isn’t being read properly, or the tracker isn’t loading, or loading before this condition.

:man_facepalming: ok, it turns out it was my fault all along. Selecting a document using the Couch DB client isn’t behaving as I’d expected! I’ve updated my gist for anyone wanting to use the Couch DB tracker!

Hi @digitalWestie ! I am using InMemory Tracker store. and after server restart I want to recover few last events from sqlite tracker store (that i am using to store tracker state). How can I do that, earlier I tried to cinfigure ‘action_session_start’ default action but that works only when conversation session expires. will you pl help me in achieving my use-case?

You’ll need to configure endpoints.yml file to use sqlite if that’s what you’re after. The above example isn’t relevant to your situation unless you’re using Couchdb. Maybe this example can help: Save conversation sqlite