## Bug description

I set up a self-hosted instance via AWS cloudformation and updated it recently.

The page /instance/status fails to load for me.

## Expected behavior

Instance status page loads successfully.

## How to reproduce

- Set up a cloudformation instance
- ???
- Visit /instance/status
- See report on 500 error from backend

## Environment

- 1.15.1 (latest docker container)

## Additional context

Not able to provide a lot of useful context here due to https://github.com/PostHog/deployment/issues/32

#### *Thank you* for your bug report – we love squashing them!

posthog/views.py
return HttpResponse("ok", content_type="text/plain")
def stats(request):
    stats_response: Dict[str, Union[int, str]] = {}
    stats_response["worker_heartbeat"] = get_redis_heartbeat()
    return JsonResponse(stats_response)
@never_cache
@login_required
def system_status(request):
    is_multitenancy: bool = getattr(settings, "MULTI_TENANCY", False)
    if is_multitenancy and not request.user.is_staff:
        raise AuthenticationFailed(detail="You're not authorized.")
    from .models import Element, Event
    redis_alive = is_redis_alive()
    postgres_alive = is_postgres_alive()
    metrics = list()
    metrics.append({"metric": "Redis alive", "value": redis_alive})
    metrics.append({"metric": "Postgres DB alive", "value": postgres_alive})
    if postgres_alive:
        postgres_version = connection.cursor().connection.server_version
        metrics.append(
            {
                "metric": "Postgres server version",
                "value": "{}.{}.{}".format(
                    int(postgres_version / 100 / 100), int(postgres_version / 100) % 100, postgres_version % 100
                ),
            }
        )