Changes between Version 3 and Version 5 of Ticket #33533


Ignore:
Timestamp:
Mar 15, 2022, 3:38:44 PM (3 years ago)
Author:
Michael
Comment:

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  
    1818In 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.
    1919
    20 Here are some example trace backs:
     20Here are some example tracebacks of the many errors raised:
    2121{{{
    2222Django Version: 4.0.1
     
    3636/home/michael/.venv/project/lib/python3.8/site-packages/django/contrib/auth/__init__.py, line 60, in _get_user_session_key
    3737return get_user_model()._meta.pk.to_python(request.session[SESSION_KEY])
     38
    3839
    3940Exception Type: MultipleObjectsReturned
Back to Top