Skip to content

Authentik database error after upgrade #11874

@metril

Description

@metril

Describe the bug
After upgrading authentik to 2024.10, there is a database error.

django.db.utils.OperationalError: index row size 4256 exceeds btree version 4 maximum 2704 for index "authentik_p_token_4bc870_idx"
DETAIL:  Index row references tuple (14,10) in relation "authentik_providers_oauth2_accesstoken".

To Reproduce
Steps to reproduce the behavior:

  1. At some point, you should have been running postgres12 and have upgrade to postgres16 due to authentik requirement changes.
  2. Upgrade to any authentik version after 2024.8.3

Expected behavior
Authentik should be working after upgrading to the latest version

Logs

django.db.utils.OperationalError: index row size 4256 exceeds btree version 4 maximum 2704 for index "authentik_p_token_4bc870_idx"
DETAIL:  Index row references tuple (14,10) in relation "authentik_providers_oauth2_accesstoken".
HINT:  Values larger than 1/3 of a buffer page cannot be indexed.
Consider a function index of an MD5 hash of the value, or use full text indexing.
{"error":"authentik starting","event":"failed to proxy to backend","level":"warning","logger":"authentik.router","timestamp":"2024-10-31T04:06:03Z"}
{"error":"exit status 1","event":"gunicorn process died, restarting","level":"warning","logger":"authentik.router","timestamp":"2024-10-31T04:06:04Z"}
{"error":"exit status 1","event":"gunicorn failed to start, restarting","level":"error","logger":"authentik.router","timestamp":"2024-1
**Version and Deployment (please complete the following information):**
  • authentik version: [e.g. 2024.10]
  • Deployment: [docker-compose]

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingbug/confirmedConfirmed bugs

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions