librephotos
librephotos copied to clipboard
Faces Dashboard: Slow reponses when tagging faces
π Bug Report
π Description of issue:
When tagging faces, I experience slow performance and face tiles are not loading for up to 20-60 seconds or more I've included the logs from Firefox - there does not seem to be a consistent pattern in the backend logs
π How can we reproduce it:
Ensure "write metadata to file is enabled in settings" Select multiple faces in the "unknown categori" and assign a name. Using Firefox 121.0.1 (64-bit)
Please provide additional information:
- π» Operating system: Linux
- β Architecture (x86 or ARM): x86
- π’ Librephotos version:
- πΈ Librephotos installation method (Docker, Kubernetes, .deb, etc.): docker
- π If Docker or Kubernets, provide docker-compose image tag: 25685f68f7bc
- π How is you picture library mounted (Local file system (Type), NFS, SMB, etc.): local
*** undefined autofill.js:7:28229 This site appears to use a scroll-linked positioning effect. This may not work well with asynchronous panning; see https://firefox-source-docs.mozilla.org/performance/scroll-linked_effects.html for further details and to join the discussion on related tools and features! faces Some cookies are misusing the recommended βSameSiteβ attribute 20 [USO] Button detection aborting due to timeout. 41 injected.js:17:319482 [USO] Button detection aborting due to timeout. 25 injected.js:17:319482 Uncaught (in promise) ZodError: [ { "code": "invalid_type", "expected": "object", "received": "string", "path": [ "data" ], "message": "Expected object, received string" } ] _b index.mjs:164 get error index.mjs:538 parse index.mjs:638 lM errorMiddleware.ts:17 Redux 8 index.mjs:164:8 a Redux Uncaught (in promise) ZodError: [ { "code": "invalid_type", "expected": "object", "received": "string", "path": [ "data" ], "message": "Expected object, received string" } ] _b index.mjs:164 get error index.mjs:538 parse index.mjs:638 lM errorMiddleware.ts:17 Redux 8 2 index.mjs:164:8 Uncaught (in promise) ZodError: [ { "code": "invalid_type", "expected": "object", "received": "string", "path": [ "data" ], "message": "Expected object, received string" } ] _b index.mjs:164 get error index.mjs:538 parse index.mjs:638 lM errorMiddleware.ts:17 Redux 8 index.mjs:164:8 Uncaught (in promise) ZodError: [ { "code": "invalid_type", "expected": "object", "received": "string", "path": [ "data" ], "message": "Expected object, received string" } ] _b index.mjs:164 get error index.mjs:538 parse index.mjs:638 lM errorMiddleware.ts:17 Redux 8 index.mjs:164:8 Uncaught (in promise) ZodError: [ { "code": "invalid_type", "expected": "object", "received": "string", "path": [ "data" ], "message": "Expected object, received string" } ] _b index.mjs:164 get error index.mjs:538 parse index.mjs:638 lM errorMiddleware.ts:17 Redux 8 index.mjs:164:8 Uncaught (in promise) ZodError: [ { "code": "invalid_type", "expected": "object", "received": "string", "path": [ "data" ], "message": "Expected object, received string" } ] _b index.mjs:164 get error index.mjs:538 parse index.mjs:638 lM errorMiddleware.ts:17 Redux 8 index.mjs:164:8 Uncaught (in promise) ZodError: [ { "code": "invalid_type", "expected": "object", "received": "string", "path": [ "data" ], "message": "Expected object, received string" } ] _b index.mjs:164 get error index.mjs:538 parse index.mjs:638 lM errorMiddleware.ts:17 Redux 8 index.mjs:164:8 Uncaught (in promise) ZodError: [ { "code": "invalid_type", "expected": "object", "received": "string", "path": [ "data" ], "message": "Expected object, received string" } ] _b index.mjs:164 get error index.mjs:538 parse index.mjs:638 lM errorMiddleware.ts:17 Redux 8 2 index.mjs:164:8 Uncaught (in promise) ZodError: [ { "code": "invalid_type", "expected": "object", "received": "string", "path": [ "data" ], "message": "Expected object, received string" } ] _b index.mjs:164 get error index.mjs:538 parse index.mjs:638 lM errorMiddleware.ts:17 Redux 8 10 index.mjs:164:8 Uncaught (in promise) ZodError: [ { "code": "invalid_type", "expected": "object", "received": "string", "path": [ "data" ], "message": "Expected object, received string" } ] _b index.mjs:164 get error index.mjs:538 parse index.mjs:638 lM errorMiddleware.ts:17 Redux 17 LSe FaceDashboard.tsx:100 LSe FaceDashboard.tsx:94 React 9 x scheduler.production.min.js:13 T scheduler.production.min.js:14 66073 scheduler.production.min.js:14 Webpack 12 4 index.mjs:164:8 XHRGET https://libre.myhostname.com/api/rqavailable/ [HTTP/2 401 59ms]
β--- output from "network" tab below:
GET /media/faces/3bd98721e9c5fb630b1fc91d82b81a691_5.jpg undefined
Host: libre.myhostname.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0
Accept: image/avif,image/webp,/
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
DNT: 1
Connection: keep-alive
Referer: https://libre.myhostname.com/faces
Cookie: jwt=
β
Actually I did see some stuff in the backend log. I think this is partially caused by the worker threads timing out due to write delays: backend_1 | [2024-01-22 14:41:20 +0000] [16942] [INFO] Autorestarting worker after current request. proxy_1 | 172.20.0.15 - - [22/Jan/2024:14:41:20 +0000] "GET /api/rqavailable/ HTTP/1.1" 200 61 "https://libre.myhostname.com/faces" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0" backend_1 | [2024-01-22 14:41:21 +0000] [16942] [INFO] Worker exiting (pid: 16942) backend_1 | [2024-01-22 14:41:21 +0000] [16979] [INFO] Booting worker with pid: 16979 backend_1 | use SECRET_KEY from env
I isolated logging from the backend and actually looks like I have a lot of dying/rebooting worker nodes: [2024-01-24 19:59:36 +0000] [4858] [INFO] Autorestarting worker after current request. [2024-01-24 19:59:38 +0000] [4858] [INFO] Worker exiting (pid: 4858) [2024-01-24 19:59:39 +0000] [4880] [INFO] Booting worker with pid: 4880 use SECRET_KEY from env Not Found: /media/thumbnails_big/ 127.0.0.1 - - [2024-01-24 19:59:40] "POST /search/ HTTP/1.1" 200 244 0.001472 [2024-01-24 20:00:57 +0000] [4868] [INFO] Autorestarting worker after current request. [2024-01-24 20:00:57 +0000] [4868] [INFO] Worker exiting (pid: 4868) [2024-01-24 20:00:58 +0000] [4895] [INFO] Booting worker with pid: 4895 use SECRET_KEY from env Unauthorized: /api/rqavailable/ [2024-01-24 20:03:20 +0000] [4895] [INFO] Autorestarting worker after current request. [2024-01-24 20:03:21 +0000] [4895] [INFO] Worker exiting (pid: 4895) [2024-01-24 20:03:22 +0000] [4917] [INFO] Booting worker with pid: 4917 use SECRET_KEY from env [2024-01-24 20:03:58 +0000] [4880] [INFO] Autorestarting worker after current request. [2024-01-24 20:03:59 +0000] [4880] [INFO] Worker exiting (pid: 4880) [2024-01-24 20:04:00 +0000] [4930] [INFO] Booting worker with pid: 4930 use SECRET_KEY from env Unauthorized: /api/rqavailable/ [2024-01-24 20:12:48 +0000] [4930] [INFO] Autorestarting worker after current request. [2024-01-24 20:12:48 +0000] [4930] [INFO] Worker exiting (pid: 4930) [2024-01-24 20:12:49 +0000] [4956] [INFO] Booting worker with pid: 4956 use SECRET_KEY from env [2024-01-24 20:13:14 +0000] [4917] [INFO] Autorestarting worker after current request. [2024-01-24 20:13:15 +0000] [4917] [INFO] Worker exiting (pid: 4917) [2024-01-24 20:13:16 +0000] [4967] [INFO] Booting worker with pid: 4967
Removed the excessive invalidation when labeling persons. Should work better now.