fix: Job traces-a8b2ddcf-0d6c-4c5f-8fb4-aad709372869-1767983969088000000... #169

Open
opened 2026-04-05 16:19:00 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @oneuptime-dev[bot] on 1/9/2026

Exception Fix

This pull request was automatically generated by OneUptime AI Agent to fix an exception.

Exception Details

Service: telemetry
Type: Error
Message: Job traces-a8b2ddcf-0d6c-4c5f-8fb4-aad709372869-1767983969088000000 could not be removed because it is locked by another worker

Stack Trace

Error: Job traces-a8b2ddcf-0d6c-4c5f-8fb4-aad709372869-1767983969088000000 could not be removed because it is locked by another worker
    at Job.remove (/usr/src/Common/node_modules/bullmq/src/classes/job.ts:677:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Function.addJob (/usr/src/Common/Server/Infrastructure/Queue.ts:224:7)
    at async Function.addTelemetryIngestJob (/usr/src/app/Services/Queue/TelemetryQueueService.ts:56:7)
    at async Function.ingestTraces (/usr/src/app/Services/OtelTracesIngestService.ts:122:7)

Summary of Changes

  • Make telemetry ingest jobIds truly unique by adding a small random suffix, preventing collisions so Queue.addJob never tries to remove an active/locked job.
    Code Change
  • Updated Telemetry/Services/Queue/TelemetryQueueService.ts:54 to append Text.generateRandomNumber(6) to the jobId.
    Notes
  • I attempted npm run compile in Telemetry/, but TypeScript failed because @types/node / @types/jest aren’t present in Telemetry/node_modules in this environment (dependency install issue, not caused by this patch).

This PR was automatically generated by OneUptime AI Agent

*Originally created by @oneuptime-dev[bot] on 1/9/2026* ## Exception Fix This pull request was automatically generated by OneUptime AI Agent to fix an exception. ### Exception Details **Service:** telemetry **Type:** Error **Message:** Job traces-a8b2ddcf-0d6c-4c5f-8fb4-aad709372869-1767983969088000000 could not be removed because it is locked by another worker ### Stack Trace ``` Error: Job traces-a8b2ddcf-0d6c-4c5f-8fb4-aad709372869-1767983969088000000 could not be removed because it is locked by another worker at Job.remove (/usr/src/Common/node_modules/bullmq/src/classes/job.ts:677:13) at processTicksAndRejections (node:internal/process/task_queues:105:5) at async Function.addJob (/usr/src/Common/Server/Infrastructure/Queue.ts:224:7) at async Function.addTelemetryIngestJob (/usr/src/app/Services/Queue/TelemetryQueueService.ts:56:7) at async Function.ingestTraces (/usr/src/app/Services/OtelTracesIngestService.ts:122:7) ``` ### Summary of Changes - Make telemetry ingest `jobId`s truly unique by adding a small random suffix, preventing collisions so `Queue.addJob` never tries to remove an active/locked job. **Code Change** - Updated `Telemetry/Services/Queue/TelemetryQueueService.ts:54` to append `Text.generateRandomNumber(6)` to the `jobId`. **Notes** - I attempted `npm run compile` in `Telemetry/`, but TypeScript failed because `@types/node` / `@types/jest` aren’t present in `Telemetry/node_modules` in this environment (dependency install issue, not caused by this patch). --- *This PR was automatically generated by [OneUptime AI Agent](https://oneuptime.com)*
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#169