Rasa X default session time

Hi, I would like to know the default session time in rasa x. Is this same as the session we configure in domain.yml (session_expiration_time)?

@lis Yes, I guess so :slight_smile:

@nik202,

In that case, how often is action_session_start triggered? In rasa x I see this happening quite often ( a little more than a minute). In my domain.yml file, I’ve given that session_expiration_time as 60, and as per their documentation it means 60 minutes and not 60 seconds. So I’m wondering why rasa x is triggering action_session_start quite often.

Yes it should be minutes.

If you give an expiration time of 600 and it executes action_session_start after 10 minutes but not less, then the value is in seconds and should be reported through a GitHub issue.

1 Like

@ChrisRahme, so action_session_start and session_expiration_time don’t really go hand in hand is it? By your comment, it looks like action_session_start is triggered once in every (session_expiration_time/60) minutes?

That’s what I’m suggesting you try.

Try to set it to 600 instead of 60 and check if action_session_start will still execute every minute or every 10 minutes now.

Ahh, alright. Thanks, will check this :slight_smile:

1 Like

@ChrisRahme, looks like the action_session_start is triggered whenever a lock is acquired (I’m assuming a conversation begins when a lock is acquired). Default lock lifetime is 60 seconds. (Default Actions) Is there any link you can point me to where I can understand how a session is maintained in rasa? Thanks in advance :smile:

1 Like

So even with session_expiration_time of 600 it still resets after 60 seconds? :sweat_smile:

@ChrisRahme yes, it looks like that. Although it makes no sense to me :sweat_smile:

Weird…

I don’t know who to tag for help. @Juste?

1 Like

Need your help with this also @nik202 :smile:

@lis a lot of research already happened :stuck_out_tongue: but if you need my opinion let me give you a general thumb rule.

Firstly, you log in to rasa x using username and password, and even before securing the SSL, the application is vulnerable to an attack, so rasa set the default session_expiration_time to 60 (60min) ?? But, I am not sure, why they have set to 60 only, but on the idle scenario nowadays we follow session expire between 15-30 (I guess you can change it as per your need?:slight_smile: )

Secondly, I have found this post which will help you: Balance User Experience and Security to Retain Customers apart from this seriously. I have not experimented much on the session as its least important for me but your questions are always mind bursting :exploding_head:

I hope I have contributed well in this research :stuck_out_tongue: and hope this will solve you question. Good Luck Lis

thanks @nik202.

one last question - does dropping a lock (deleting lock) necessarily mean end of conversation session? From [this]Default Actions, what I don’t seem to understand is this point - * at the beginning of each new conversation. What does this exactly mean? From what I’m seeing it’s not the second or the third point that initiates action_session_start, so I’m trying to understand what the first point really means.

But thanks a lot for sharing that article. It sure does help me. Please don’t mind me, I want to completely understand or atleast try to understand how different things work, hence these questions :smile:

I not get this? any reference link ? or screenshot?

Sure, not worries if this help, you know what you need to do :stuck_out_tongue:

1 Like

@nik202 yeah, sure. so like i previously described my issue which is action_session_start is triggered once in 60 seconds or so. This is definitely not after session_expiration_time(point 2) or after sending /session_start (point 3). I’m trying to understand what point 1 means in the rasa docs I previously shared.

All your answer come under this :slight_smile:

action_session_start#

This action starts a new conversation session, and is executed in the following situations:

  • at the beginning of each new conversation
  • after a user was inactive for a period defined by the session_expiration_time parameter in the domain’s session configuration
  • when a user sends a “/session_start” message during a conversation

In layman its a function :stuck_out_tongue:

You still want more research ok see this:

  1. https://github.com/RasaHQ/rasa/blob/main/rasa/core/actions/action.py
  2. https://github.com/RasaHQ/rasa/blob/main/rasa/core/processor.py
  3. https://github.com/RasaHQ/rasa/blob/main/rasa/core/processor.py#L246

Now that it, I’m not doing my Ph.D in Rasa :stuck_out_tongue:

I hope this will solve all your issue and please if any of the above solution or suggestion help you close this thread :wink:

Good Luck! Over and out!

1 Like

haha, okay thanks. ill read about it separately. will close this thread. thanks @nik202

@lis you need to relax :stuck_out_tongue: so do we then :upside_down_face: Happy to help you and I have done half of my research in rasa itself:P See you around!

1 Like

:laughing: