[BUG] User deletetion does not work #2590

Closed
opened 2026-02-05 06:14:05 +03:00 by OVERLORD · 9 comments
Owner

Originally created by @al13nus on GitHub (Mar 13, 2024).

The bug

https://github.com/immich-app/immich/issues/1086
https://github.com/immich-app/immich/pull/1090

Hey, nearly the same issue here: I delete a user and waited for more then 3 weeks. I don't reminde the date but it was something like 3. march. After this period the user is still shown but I cannot remove him or create a new one with this email:

grafik

The OS that Immich Server is running on

Ubuntu 22

Version of Immich Server

1.98.2

Version of Immich Mobile App

1.98.2

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

standard

Your .env content

in docker stack, standard

Reproduction steps

1. click to delete user
2. wait the period where he should be deleted
3. check if really deleted
...

Additional information

No response

### Tasks
Originally created by @al13nus on GitHub (Mar 13, 2024). ### The bug https://github.com/immich-app/immich/issues/1086 https://github.com/immich-app/immich/pull/1090 Hey, nearly the same issue here: I delete a user and waited for more then 3 weeks. I don't reminde the date but it was something like 3. march. After this period the user is still shown but I cannot remove him or create a new one with this email: ![grafik](https://github.com/immich-app/immich/assets/19974381/9fe92d84-4370-450c-911d-abf78e659c6b) ### The OS that Immich Server is running on Ubuntu 22 ### Version of Immich Server 1.98.2 ### Version of Immich Mobile App 1.98.2 ### Platform with the issue - [X] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML standard ``` ### Your .env content ```Shell in docker stack, standard ``` ### Reproduction steps ```bash 1. click to delete user 2. wait the period where he should be deleted 3. check if really deleted ... ``` ### Additional information _No response_ ```[tasklist] ### Tasks ```
Author
Owner

@jrasm91 commented on GitHub (Mar 13, 2024):

It is possible the user failed to delete because of a bug. Can you check the immich-microservice logs to see if there is any indication there as to why it failed? The job to delete a user should run ever night so you shouldn't have to go too far back.

@jrasm91 commented on GitHub (Mar 13, 2024): It is possible the user failed to delete because of a bug. Can you check the immich-microservice logs to see if there is any indication there as to why it failed? The job to delete a user should run ever night so you shouldn't have to go too far back.
Author
Owner

@monkeyotg commented on GitHub (Mar 14, 2024):

same here, but the data, folder on the disk from these accounts are deleted, just the user-recorder is still there.
I think perhaps it is a feature to let you check which account is deleted. 😅

Snipaste_2024-03-13_22-45-01

@monkeyotg commented on GitHub (Mar 14, 2024): same here, but the data, folder on the disk from these accounts are deleted, just the user-recorder is still there. I think perhaps it is a feature to let you check which account is deleted. 😅 ![Snipaste_2024-03-13_22-45-01](https://github.com/immich-app/immich/assets/8792193/80661ee1-acb8-47f8-a624-44b71e6e58b1)
Author
Owner

@samholton commented on GitHub (Mar 14, 2024):

v1.98.1 fixed an issue deleting users that still had active shared links - so that shouldn't be an issue in v1.98.2

The log messages you are looking for are:

Deleting user: <user uuid>

Removing user from filesystem:

Removing user from database:

If you can check the database, the output of the following query could be helpful as well

select "email", "deletedAt", "status"
from users
where email = 'user@email.com';

Also, just to confirm, you haven't changed the DELETE DELAY option under User Settings on the Admin System Settings?

@samholton commented on GitHub (Mar 14, 2024): [v1.98.1](https://github.com/immich-app/immich/releases/tag/v1.98.1) fixed an issue deleting users that still had active shared links - so that shouldn't be an issue in v1.98.2 The log messages you are looking for are: ``` Deleting user: <user uuid> Removing user from filesystem: Removing user from database: ``` If you can check the database, the output of the following query could be helpful as well ```sql select "email", "deletedAt", "status" from users where email = 'user@email.com'; ``` Also, just to confirm, you haven't changed the `DELETE DELAY` option under `User Settings` on the Admin System Settings?
Author
Owner

@monkeyotg commented on GitHub (Mar 14, 2024):

I've changed the DELETE DELAY option under User Settings. Because I am sure deleting these accounts is safe, so I've changed it to 1. And found out it didn't work, so changed it back to 7 days.

@monkeyotg commented on GitHub (Mar 14, 2024): I've changed the DELETE DELAY option under User Settings. Because I am sure deleting these accounts is safe, so I've changed it to 1. And found out it didn't work, so changed it back to 7 days.
Author
Owner

@jrasm91 commented on GitHub (Mar 14, 2024):

Can you check the immich-microservices logs for any errors?

@jrasm91 commented on GitHub (Mar 14, 2024): Can you check the immich-microservices logs for any errors?
Author
Owner

@al13nus commented on GitHub (Mar 14, 2024):

Looked into logs:

[Nest] 7  - 03/14/2024, 12:00:00 AM   ERROR [JobService] Unable to run job handler (backgroundTask/user-deletion): Error: EBUSY: resource busy or locked, rmdir 'upload/library/mariia'
[Nest] 7  - 03/14/2024, 12:00:00 AM   ERROR [JobService] Error: EBUSY: resource busy or locked, rmdir 'upload/library/mariia'

Mounting to docker:

/mnt/tank/Media/UserData/mariia/Photos | /usr/src/app/upload/library/mariia

I deleted now the folder manually and will wait 24h for final cleanup.

@al13nus commented on GitHub (Mar 14, 2024): Looked into logs: ``` [Nest] 7 - 03/14/2024, 12:00:00 AM ERROR [JobService] Unable to run job handler (backgroundTask/user-deletion): Error: EBUSY: resource busy or locked, rmdir 'upload/library/mariia' [Nest] 7 - 03/14/2024, 12:00:00 AM ERROR [JobService] Error: EBUSY: resource busy or locked, rmdir 'upload/library/mariia' ``` Mounting to docker: ``` /mnt/tank/Media/UserData/mariia/Photos | /usr/src/app/upload/library/mariia ``` I deleted now the folder manually and will wait 24h for final cleanup.
Author
Owner

@monkeyotg commented on GitHub (Mar 14, 2024):

Can you check the immich-microservices logs for any errors?

It was a long time ago, so there is no log of that day that I can find now.
Like I said, at the time I thought it was a feature.

@monkeyotg commented on GitHub (Mar 14, 2024): > Can you check the immich-microservices logs for any errors? It was a long time ago, so there is no log of that day that I can find now. Like I said, at the time I thought it was a feature.
Author
Owner

@jrasm91 commented on GitHub (Mar 14, 2024):

Can you check the immich-microservices logs for any errors?

It was a long time ago, so there is no log of that day that I can find now. Like I said, at the time I thought it was a feature.

If it hasn't been deleted yet, but it is showing red like that, which means it is "soft deleted", it will try to complete the deletion every night, so there should be errors everyday.

@jrasm91 commented on GitHub (Mar 14, 2024): > > Can you check the immich-microservices logs for any errors? > > It was a long time ago, so there is no log of that day that I can find now. Like I said, at the time I thought it was a feature. If it hasn't been deleted yet, but it is showing red like that, which means it is "soft deleted", it will try to complete the deletion every night, so there should be errors everyday.
Author
Owner

@monkeyotg commented on GitHub (Mar 14, 2024):

Somehow I think I've deleted it once. (But I don’t remember it at all.) Now the oldest log is 2024-03-11 and there are some errors. But I don't know if they are related. (Sorry, I don't know coding.)

image

these errors show themselves about 4 times a day
immich_microservices_log.txt

@monkeyotg commented on GitHub (Mar 14, 2024): Somehow I think I've deleted it once. (But I don’t remember it at all.) Now the oldest log is 2024-03-11 and there are some errors. But I don't know if they are related. (Sorry, I don't know coding.) ![image](https://github.com/immich-app/immich/assets/8792193/184f0c3c-0605-4865-b8fc-bdee91f6b119) these errors show themselves about 4 times a day [immich_microservices_log.txt](https://github.com/immich-app/immich/files/14606161/immich_microservices_log.txt)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2590