perf: optimize server-side analytics and notifications to resolve 32s transaction delay

- Added 5s timeout to GotifyNotificationService
- Reduced timeout to 2s in UmamiAnalyticsService
- Implemented non-blocking analytics tracking in layout using Next.js after() API
This commit is contained in:
2026-02-18 10:24:10 +01:00
parent 9e9bc9d3aa
commit e5b414ea76
3 changed files with 11 additions and 2 deletions

View File

@@ -91,7 +91,7 @@ export class UmamiAnalyticsService implements AnalyticsService {
// Add a timeout to prevent hanging requests
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 10000); // 10s timeout
const timeoutId = setTimeout(() => controller.abort(), 2000); // 2s timeout
const headers: Record<string, string> = {
'Content-Type': 'application/json',