Arnau
Arnau4w ago

Understanding eventstore.unique_constraints (V3-DKcYh)

Hello, In a self-hosted setup with a single Instance (v3.3.0) where we manage 1 organization with ~39k users, we’ve noticed leftover records in the eventstore.unique_constraints table that don’t correspond to any existing user in the instance Examples:
unique_type: usernames (email)
unique_type: external_idps
unique_type: usernames (email)
unique_type: external_idps
These orphaned records are linked to human users that no longer exist, but they’re blocking new user creation with the V3-DKcYh error. After tracing, I found they all share one thing in common: they were created during a period when the ZITADEL database was under high CPU load (90%–95%). Since addressing the DB performance issue, we haven’t seen the problem reoccur. Manually deleting these stale entries from eventstore.unique_constraints resolves the conflict. Questions: 1. Is it common practice having to monitor eventstore.unique_constraints when troubleshooting unexpected V3-DKcYh errors? 2. What could cause this situation? Is there any built-in cleanup process for invalid or stale constraints? Thank you!
2 Replies
Rajat
Rajat6d ago
hey @Arnau the only way I could think of is that the manual deletion of these entries from eventstore.unique_constraints can be used to resolve the conflict and allow new users to be created.
Gigi the Giraffe (Zitadel)
🎉 Looks like you just helped out another community member! Thanks for being so helpful <@1346540274674827395>! You're now one step closer to leveling up—keep up the amazing peer support! 🚀

Did you find this page helpful?