[Question]: What is the lifetime of an (API-)Chat Session and how can one change it?
Self Checks
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (Language Policy).
- [x] Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
- [x] Please do not modify this template :) and fill in all the required fields.
Describe your problem
as the title suggests: ow long is the lifetime of a Chat session created through the API? When I experimented with Postman the session was usually gone the next day, which made me assume a lifetime of ~12 hrs, but right now I'm geting a session with a lifetime of 17+ hrs?
also if its possible to set this through the server setings, where can the chat session length be set. thank you kindly.
RAGFlow chat sessions created via the API do not have a built-in expiration or automatic timeout—they persist in the database until you explicitly delete them using the API or SDK. There is no configuration option, environment variable, or server setting to set a session lifetime or TTL for chat sessions. The variability you observed (e.g., sessions lasting 12 hours vs. 17+ hours) is not controlled by RAGFlow itself, but may be due to external factors like manual deletion, database cleanup, or infrastructure changes.
To remove sessions, you need to send a DELETE request to the appropriate API endpoint; otherwise, sessions will remain indefinitely. There is no limit on the number of sessions you can create, and session resources persist until you delete them yourself.
Reference 1
Reference 2
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Q1: I don't think we mannualy set a lifetime for sessions.
Chat session which means message history stored in DB. If you want to new a session, you could drop session ID while requesting.