Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep getting duplicate key value violates unique constraint from pgsql log #3159

Open
jwjoel opened this issue Jan 6, 2025 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@jwjoel
Copy link

jwjoel commented Jan 6, 2025

Describe the Bug

I am encountering a duplicate key value violates unique constraint error in the pgsql console 4-5 times per minute. My website receives 132k page views per day, and the frequency of this error seems to increase with higher traffic. The logs from Umami show no abnormalities.

Does this because of the race condition? Just wondering the potential impact of this issue. Thanks!

image
image

Database

PostgreSQL

Relevant log output

No response

Which Umami version are you using? (if relevant)

No response

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

Google Cloud Run

@andreacardelli
Copy link

Some here with both postgressql or mysql.

@mikecao
Copy link
Collaborator

mikecao commented Jan 10, 2025

It's a race condition issue with creating a session for a brand new visitor. We're considering moving this logic to the database so at least it won't clog up your logs.

@mikecao mikecao added the enhancement New feature or request label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants