Back

Error: Duplicated document: Duplicate entry 'xxx' for key '_uid'

  • 0
  • Self Hosted
  • Databases
Irvine
24 Mar, 2024, 06:25

Hi Support,

We are randomly receiving this kind of error report from Sentry everyday. All of them seems related to metrics, please look at the error details below.

Error Details:

  • Message: Duplicated document: Duplicate entry 'xxx' for key '_uid'
  • transactions:
    • sync_project_xxx_metric_builds.xxx.compute.total
    • sync_project_xxx_metric_builds.xxx.compute.time
    • sync_project_xxx_metric_builds.$all.compute.total
    • sync_project_xxx_metric_builds.$all.compute.time
    • sync_project_xxx_metric_documents.xxx.request.create
    • sync_project_xxx_metric_documents.xxx.request.read
    • sync_project_xxx_metric_project.$all.network.requests

We are doing horizontal scaling with shared storage, shared MariaDB, shared Redis, and shared InfluxDB. We have these service scaling horizontally, are there any non-scalable services and we left it scaling causing this error?

  • traefik
  • appwrite
  • appwrite-realtime
  • appwrite-worker-audits
  • appwrite-worker-webhooks
  • appwrite-worker-deletes
  • appwrite-worker-databases
  • appwrite-worker-builds
  • appwrite-worker-certificates
  • appwrite-worker-functions
  • appwrite-worker-mails
  • appwrite-worker-messaging
  • appwrite-worker-migrations
  • appwrite-maintenance
  • appwrite-usage
  • appwrite-schedule
  • appwrite-assistant
  • openruntimes-executor
  • openruntimes-proxy
  • telegraf
TL;DR
Developers are receiving a "Duplicated document" error related to metrics in Sentry. This error seems to be caused by horizontally scaled services like traefik and appwrite. The issue may be due to non-scalable services that were left scaling. Double-check the scalability of each service to prevent this error from occurring.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more