Django's documentation (here) state that cookie-based sessions can exceed the 'standard' of 4096 bytes per cookies.
What about database-backed sessions, is there a limit to the amount of data that can be stored in the session? I didn't see anything in the documentation, nor on SO.
For my project, I'll need to save ~50KB to a user's database-backed session. Let me know if you need more info.
The database backend stores the session data in a TextField in the database.
The size limit of this field depends on your database backend, e.g., for Postgres (stored as text) it is unlimited, and for MySQL (stored as longtext) it is approximately 4GB.
Either way the limit is going to be far higher than ~50KB!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With