Page MenuHomeSoftware Heritage

Browsing revisions log ends up with errors when going back far in time
Closed, MigratedEdits Locked

Description

When one wants to browse a revisions log using the browse web application in production, an error is raised when going back far in time (see https://archive.softwareheritage.org/browse/origin/https://github.com/ocaml/ocaml/log/?offset=1600&per_page=100&branch=refs/heads/3.08 for instance).

The reported error is the following:

[06/Jun/2019 09:56:03] [ERROR] <WSGIRequest: GET '/browse/origin/https://github.com/ocaml/ocaml/log/?offset=1600&per_page=100&branch=refs/heads/3.08'> 500
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/usr/lib/python3/dist-packages/django/utils/deprecation.py", line 142, in __call__
    response = self.process_response(request, response)
  File "/usr/lib/python3/dist-packages/django/contrib/sessions/middleware.py", line 58, in process_response
    request.session.save()
  File "/usr/lib/python3/dist-packages/django/contrib/sessions/backends/cache.py", line 57, in save
    return self.create()
  File "/usr/lib/python3/dist-packages/django/contrib/sessions/backends/cache.py", line 52, in create
    "Unable to create a new session key. "
RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.

The error is likely due to the fact that the maximum size for a memcached cache entry is reached.
Indeed, we use a cache here to backup the revisions ordering computed so far and allow pagination.

This needs to be fixed.