what happens to the expired session, expired login...
# talk-kratos
e
what happens to the expired session, expired login flows entries that are stored in the DB (assume it is postgress), does kratos automatically clears them after they are expired?
h
No, there’s no automatic cleanup. One could however use the cmd to run the database cleanup
Copy code
export DSN=...
	kratos cleanup sql -e
https://github.com/ory/kratos/blob/master/cmd/cleanup/sql.go
e
but this would also cleanup the active sessions or any other data as well is it?
i want the expired sessions, login flows etc to be deleted so they dont occupy much space, is there any way to do it, or i have to make a cron job to run everyday to manually check and delete expired artifacts?
h
but this would also cleanup the active sessions or any other data as well is it?
No, this only deletes expired sessions and flows.
or i have to make a cron job to run everyday to manually check and delete expired artifacts?
you can call this cmd on a frequency you choose. Maybe even a cron to run on a schedule
e
awesome! thanks for helping Ajay 😄
on running the above command i'm getting
nid must be not nil
h
Sorry, I just noticed that there’s an open issue for this problem - https://github.com/ory/kratos/issues/3030
e
no solution has been provided to that issue yet
h
A fix has just been merged