numbas / numbas-lti-provider

An LTI tool provider to run Numbas exams
https://docs.numbas.org.uk/lti/en/latest/
Other
11 stars 12 forks source link

django_session data not expiring #255

Closed lgretton closed 1 year ago

lgretton commented 1 year ago

The second largest database table in our installation is the django_session one, which for us has grown to 14 million entries and 6GB in the last two years. This is using MariaDB as the backend.

Reading the Django session documentation, this table is supposed to be periodically purged of old data, but for the LTI Provider this isn't happening, and I can't find anything in the docs that references it.

Have I overlooked something I'm supposed to have done with our installation to get this table purged from time to time? Do I have to manually set up a cron job to run clearsessions myself?

christianp commented 1 year ago

Oh whoops, you're right! Our sessions table also has a couple of million entries.

The documentation there says that you should set up a cron job to run python manage.py clearsessions regularly. I'll add that to the installation instructions.