Changes between Version 3 and Version 5 of Ticket #33533
- Timestamp:
- Mar 15, 2022, 3:38:44 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #33533
- Property Summary Should it be impossible for a session dict to return more than one value for a key? → SESSION_SAVE_EVERY_REQUEST = True does not handle parallel requests well if some scenarios
-
Ticket #33533 – Description
v3 v5 18 18 In production, when there are multiple workers running parrallel by uWSGI, if one has `SESSION_SAVE_EVERY_REQUEST = True`, then if one makes async requests from JavaScript (e.g. say a Service Worker caching pages on install), then the way it saves/retrieves sessions on every request fails in many spectacular ways. 19 19 20 Here are some example trace backs:20 Here are some example tracebacks of the many errors raised: 21 21 {{{ 22 22 Django Version: 4.0.1 … … 36 36 /home/michael/.venv/project/lib/python3.8/site-packages/django/contrib/auth/__init__.py, line 60, in _get_user_session_key 37 37 return get_user_model()._meta.pk.to_python(request.session[SESSION_KEY]) 38 38 39 39 40 Exception Type: MultipleObjectsReturned