Skip to content

Give Instagram connector deletes the long cascade-delete timeout - #1641

Merged
helpcodeai merged 2 commits into
mainfrom
fix/meta-delete-transaction-timeout
Nov 12, 2026
Merged

helpcodeai merged 2 commits into
mainfrom
fix/meta-delete-transaction-timeout

Conversation

@helpcodeai

Copy link
Copy Markdown
Contributor

Summary

Deleting an Instagram connector runs two statements in one Prisma transaction: the tool-call log delete (added by #1630 for the Meta Platform Terms) and the connector delete, which cascades into tools, graph nodes and edges. On 11-11 at 16:17 UTC one such delete took 5,977 ms, Prisma rolled it back at its default 5 s timeout and the user got a 500 (Sentry ANYTHINGMCP-CLOUD-BACKEND-4).

#1639 removed the main cost (kg_edges had no index on its node columns). A connector with many log rows can still pass 5 s on the log delete alone, so this transaction now uses CASCADE_DELETE_TRANSACTION (60 s), as account and workspace deletes already do.

Changes

  • ConnectorsService.remove(): pass CASCADE_DELETE_TRANSACTION to the Instagram $transaction([...]).
  • Spec: the transaction is called with those options and their timeout is above 5 s.

Type

  • Bug fix

Testing

  • Added/updated unit tests
  • npx jest src/connectors/connectors.service.remove.spec.ts in packages/backend: 3/3 passed. Full lint, typecheck and tests run in CI.

Cloud and self-hosted behave the same: only the timeout of this one delete changes. No schema change, nothing in ee/.

Checklist

  • My code follows the existing code style
  • I have tested my changes locally
  • All existing tests pass (npm test) (CI)
  • This PR has a descriptive title

Related Issues

Relates to #1638 and #1630.

@helpcodeai
helpcodeai merged commit 1b1dd75 into main Nov 12, 2026
16 checks passed
@helpcodeai
helpcodeai deleted the fix/meta-delete-transaction-timeout branch November 12, 2026 08:38
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant