Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prisma transaction can expire during map submission #998

Closed
sentry-io bot opened this issue Jul 12, 2024 · 1 comment · Fixed by #1039
Closed

Prisma transaction can expire during map submission #998

sentry-io bot opened this issue Jul 12, 2024 · 1 comment · Fixed by #1039
Assignees
Labels
For: Backend This is something to do for the backend (server folder) of the website. Priority: High Should be done first and foremost, absolutely essential for this release. Type: Bug Something isn't working the way it should

Comments

@sentry-io
Copy link

sentry-io bot commented Jul 12, 2024

I'm assuming we're keeping a transaction open for the lifetime of an S3 operation here, I think the image uploads. Not good!

Sentry Issue: BACKEND-1J

PrismaClientKnownRequestError: Transaction API error: Transaction already closed: A commit cannot be executed on an expired transaction. The timeout for this transaction was 5000 ms, however 6623 ms passed since the start of the transaction. Consider increasing the interactive tra...
  File "/app/main.js", line 11171, in MapsService.submitMapSubmissionVersion
    await this.db.$transaction(async (tx) => {
@sentry-io sentry-io bot added For: Backend This is something to do for the backend (server folder) of the website. Priority: High Should be done first and foremost, absolutely essential for this release. Type: Bug Something isn't working the way it should labels Jul 12, 2024
@GordiNoki
Copy link
Member

Images are not uploaded during this transaction. I believe it's VMFs that took most time to upload. I'm not sure how precise is information in sentry's breadcrumbs, but VMFs PUT request is what happened 5 seconds before error, so I believe this is what resulted in transaction timeout. The solution would be probably to do s3 operations separately from db transaction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For: Backend This is something to do for the backend (server folder) of the website. Priority: High Should be done first and foremost, absolutely essential for this release. Type: Bug Something isn't working the way it should
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants