Having trouble wth long running idle transactions
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- postgresql, typescript
Research direction
Start by locating the Prisma Queue polling path that issues the shown PostgreSQL UPDATE ... RETURNING query, then inspect how its transaction is opened and completed. Done means the polling transaction is finished after the query, so the connection no longer remains idle in transaction for hours or triggers the RDS alarm.
Written by the indexing model from the issue text.
Description
We're having some trouble with very long running 'idle in transsaction' connections from Prisma Queue.
Would it be possible to finish the transaction after running the polling query? It's definately the polling query and it stays in the 'idle in transaction' state for hours, which sets off an alarm in RDS.
UPDATE ""queue_jobs"" SET ""processedAt"" = NOW(), ""attempts"" = ""attempts"" + 1
WHERE id = (
SELECT id
FROM ""queue_jobs""
WHERE (""queue_jobs"".""queue"" = $1)
AND (""queue_jobs"".""finishedAt"" IS NULL)
AND (""queue_jobs"".""runAt"" < NOW())
AND (""queue_jobs"".""notBefore"" IS NULL OR ""queue_jobs"".""notBefore"" < NOW())
ORDER BY ""queue_jobs"".""priority"" ASC, ""queue_jobs"".""runAt"" ASC
FOR UPDATE SKIP LOCKED
LIMIT 1
)
RETURNING *;
- Dominant language
- TypeScript
- Stars
- 61
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mgcrea/prisma-queue
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
mgcrea/prisma-queue#15 ·
-
Timezone issues Open
Difficulty 3/5 1-2 days Newbie friendliness 42/100
mgcrea/prisma-queue#10 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
mgcrea/prisma-queue#9 · 3 comments ·
-
Infinite Loop Open
Difficulty 4/5 3-5 days Newbie friendliness 30/100
mgcrea/prisma-queue#4 · 4 comments ·
All issues in mgcrea/prisma-queue
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·