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

[Bug]: User deleting their account causes database locking #3649

Closed
4 tasks done
Sh4d opened this issue Jul 17, 2023 · 6 comments
Closed
4 tasks done

[Bug]: User deleting their account causes database locking #3649

Sh4d opened this issue Jul 17, 2023 · 6 comments
Labels

Comments

@Sh4d
Copy link

Sh4d commented Jul 17, 2023

Requirements

  • Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • Did you check to see if this issue already exists?
  • Is this only a single bug? Do not put multiple bugs in one issue.
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.

Summary

We have a user with a few hundred comments who has crashed the site twice today while trying to delete his account.

This query ends up running for a long time and locks subsequent updates to comment:

UPDATE "comment" SET "content" = $1, "deleted" = $2, "updated" = $3 WHERE ("comment"."creator_id" = $4) RETURNING "comment"."id", "comment"."creator_id", "comment"."post_id", "comment"."content", "comment"."removed", "comment"."published", "comment"."updated", "comment"."deleted", "comment"."ap_id", "comment"."local", "comment"."path", "comment"."distinguished", "comment"."language_id"

This was running for 8 minutes before I killed it. The user in question has 352 comments and 3073 entries in comment_like. This doesn't seem like such a large amount that there should be significant impact from a user deletion.

Steps to Reproduce

I haven't been able to reproduce this with a test user, so far only this one external user keeps causing it on our site.

I've had to disable the /api/v3/user/delete_account URL for now.

Technical Details

Logs are too noisy but this is triggered by a post to /api/v3/user/delete_account from Jerboa

Version

0.18.2

Lemmy Instance URL

lemmy.ca

@Sh4d Sh4d added the bug Something isn't working label Jul 17, 2023
@RocketDerp

This comment was marked as abuse.

@Sh4d
Copy link
Author

Sh4d commented Jul 17, 2023

Duplicate? #3339 EDIT: that's not the one I was thinking of, but another, still looking

Thinking of #3528 maybe?

@RocketDerp

This comment was marked as abuse.

@Nutomic
Copy link
Member

Nutomic commented Jul 20, 2023

#3165

@Nutomic Nutomic closed this as not planned Won't fix, can't repro, duplicate, stale Jul 20, 2023
@RocketDerp

This comment was marked as abuse.

@kroese
Copy link
Contributor

kroese commented Jul 24, 2023

Im observing the same issue, but in my case the user has 10k posts and zero comments. So its not only related to the comments-query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants