mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 16:17:13 +01:00
Fix multiple issues: tracker multiple execution, credentials configurable, exclude-hash, and other fixes
This commit is contained in:
parent
d590c6b078
commit
46532f0778
23 changed files with 553 additions and 30 deletions
29
contributions/duplicate-session-fix.js
Normal file
29
contributions/duplicate-session-fix.js
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
// Fix for issue #3712: Duplicate violates unique constraint "session_pkey" errors in PostgreSQL logs
|
||||
// File: src/app/api/send/route.ts
|
||||
|
||||
// Add error handling for duplicate sessions (around line 137):
|
||||
/*
|
||||
// Create a session if not found
|
||||
if (!clickhouse.enabled && !cache?.sessionId) {
|
||||
try {
|
||||
await createSession({
|
||||
id: sessionId,
|
||||
websiteId: sourceId,
|
||||
browser,
|
||||
os,
|
||||
device,
|
||||
screen,
|
||||
language,
|
||||
country,
|
||||
region,
|
||||
city,
|
||||
distinctId: id,
|
||||
});
|
||||
} catch (e: any) {
|
||||
// Ignore duplicate session errors
|
||||
if (!e.message.toLowerCase().includes('unique constraint')) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue