I
Immich3mo ago
satmandu

Android: newest pictures from web view not showing up in view

I did a clean install of the Android Immich app from the Immich github release page for 1.125.7, which is the same version as my server. The web view for my immich instance shows many recent pictures that just do not show up in the Android app. Photos in the bottom left of the screen has circle spinner spinning. Postgres is pegged on my server at 100%, so do I just need to wait? (I do occasionally see "Error while getting remote assets" messages in the app's logs.)
28 Replies
Immich
Immich3mo ago
:wave: Hey @satmandu, Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:. References - Container Logs: docker compose logs docs - Container Status: docker ps -a docs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy - Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA Checklist I have... 1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time). 2. :ballot_box_with_check: read applicable release notes. 3. :ballot_box_with_check: reviewed the FAQs for known issues. 4. :ballot_box_with_check: reviewed Github for known issues. 5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy). 6. :blue_square: uploaded the relevant information (see below). 7. :blue_square: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable (an item can be marked as "complete" by reacting with the appropriate number) Information In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider: - Your docker-compose.yml and .env files. - Logs from all the containers and their status (see above). - All the troubleshooting steps you've tried so far. - Any recent changes you've made to Immich or your system. - Details about your system (both software/OS and hardware). - Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h). - The version of the Immich server, mobile app, and other relevant pieces. - Any other information that you think might be relevant. Please paste files and logs with proper code formatting, and especially avoid blurry screenshots. Without the right information we can't work out what the problem is. Help us help you ;) If this ticket can be closed you can use the /close command, and re-open it later if needed.
satmandu
satmanduOP3mo ago
ApiException 400: HTTP connection failed: POST /sync/full-sync (Inner exception: ClientException: Software caused connection abort, uri=http://192.168.0.19:2283/api/sync/full-sync) #0 IOClient.send (package:http/src/io_client.dart:156) <asynchronous suspension> #1 BaseClient._sendUnstreamed (package:http/src/base_client.dart:93) <asynchronous suspension> #2 ApiClient.invokeAPI (package:openapi/api_client.dart:96) <asynchronous suspension> #3 SyncApi.getFullSyncForUser (package:openapi/api/sync_api.dart:99) <asynchronous suspension> #4 AssetService._getRemoteAssets (package:immich_mobile/services/asset.service.dart:145) <asynchronous suspension> #5 SyncService._syncRemoteAssetsForUser (package:immich_mobile/services/sync.service.dart:267) <asynchronous suspension> #6 SyncService._syncRemoteAssetsFull (package:immich_mobile/services/sync.service.dart:257) <asynchronous suspension> #7 SyncService.syncRemoteAssetsToDb.<anonymous closure> (package:immich_mobile/services/sync.service.dart:92) <asynchronous suspension> #8 AsyncMutex.run.<anonymous closure> (package:immich_mobile/utils/async_mutex.dart:15) <asynchronous suspension>
Zeus
Zeus3mo ago
Are you using a hard drive for Postgres?
satmandu
satmanduOP3mo ago
SSD
satmandu
satmanduOP3mo ago
I can export the postgres db and reimport it into a clean postgres container if that would help? I do have 2.8Tb of photos and videos... wait a second the ssd is external though... but it's usb3, on a dedicated connection, so hopefully that shouldn't be an issue?
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
9a161abac1e0 immich_microservices 0.03% 218.8MiB / 61.18GiB 0.35% 1.81MB / 5.95MB 0B / 0B 17
3149fe123232 immich_server 0.03% 312.8MiB / 61.18GiB 0.50% 51.3MB / 28.1MB 18.3MB / 0B 23
fe017ae02b14 immich_machine_learning 34.56% 177.7MiB / 61.18GiB 0.28% 15.8kB / 0B 0B / 0B 19
d85d969c5881 immich_redis 0.08% 128.9MiB / 61.18GiB 0.21% 5.97MB / 1.91MB 0B / 0B 5
655da7884a37 immich_postgres 100.14% 578.2MiB / 61.18GiB 0.92% 3.05MB / 51.2MB 4MB / 0B 23
c3aef9fcd20a immich_power_tools 0.00% 61.6MiB / 61.18GiB 0.10% 10.6MB / 9.72MB 0B / 0B 11
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
9a161abac1e0 immich_microservices 0.03% 218.8MiB / 61.18GiB 0.35% 1.81MB / 5.95MB 0B / 0B 17
3149fe123232 immich_server 0.03% 312.8MiB / 61.18GiB 0.50% 51.3MB / 28.1MB 18.3MB / 0B 23
fe017ae02b14 immich_machine_learning 34.56% 177.7MiB / 61.18GiB 0.28% 15.8kB / 0B 0B / 0B 19
d85d969c5881 immich_redis 0.08% 128.9MiB / 61.18GiB 0.21% 5.97MB / 1.91MB 0B / 0B 5
655da7884a37 immich_postgres 100.14% 578.2MiB / 61.18GiB 0.92% 3.05MB / 51.2MB 4MB / 0B 23
c3aef9fcd20a immich_power_tools 0.00% 61.6MiB / 61.18GiB 0.10% 10.6MB / 9.72MB 0B / 0B 11
It isn't otherwise resource limited.
Zeus
Zeus3mo ago
I don't think USB3 for your postgres database for 3 TB of files is good would recommend using a real internal SSD over SATA the IOPS will be severely limited
satmandu
satmanduOP3mo ago
hmm... ok I can make a separate zpool on the internal nvme drive. I'll try that and report back. @Zeus I stand corrected, the db IS on a pool attached to the internal drive. I will play with my zfs settings though to see if adjusting recordsize helps
Zeus
Zeus3mo ago
Anything in the Postgres logs?
satmandu
satmanduOP3mo ago
Sorry, how do I get to that? docker container logs 655da7884a37 PostgreSQL Database directory appears to contain a database; Skipping initialization 2025-02-07 15:51:22.312 UTC [1] LOG: redirecting log output to logging collector process 2025-02-07 15:51:22.312 UTC [1] HINT: Future log output will appear in directory "log".
Zeus
Zeus3mo ago
You’ll have to go into the mount for the database and check the logs folder
bo0tzz
bo0tzz3mo ago
What sort of CPU are you running on? And how big is your Postgres db (not the Immich files)
satmandu
satmanduOP3mo ago
@bo0tzz : 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz The db dir tree is 1.8Gb I'm dumping the db now. I'm going to then set the recordsize to 8k, and then restart postgres and import the backup
bo0tzz
bo0tzz3mo ago
Hmm, that really shouldn't struggle as hard as it apparently is
satmandu
satmanduOP3mo ago
This is a little NUC... but it does have 64gb of ram
bo0tzz
bo0tzz3mo ago
Mostly OOI, before you delete this existing postgres instance, can you try running VACUUM (FULL, ANALYZE); and see if that changes things? Restoring to a new instance should have the same effect so this should help separate that from the recordsize change
Zeus
Zeus3mo ago
Would want to see the logs before doing anything else first
satmandu
satmanduOP3mo ago
Not seeing anything weird in the logs... this is the weirdest I see: 2025-02-07 15:20:46.211 UTC [1] LOG: starting PostgreSQL 14.10 (Debian 14.10-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit 2025-02-07 15:20:46.211 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 2025-02-07 15:20:46.211 UTC [1] LOG: listening on IPv6 address "::", port 5432 2025-02-07 15:20:46.215 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2025-02-07 15:20:46.220 UTC [28] LOG: database system was shut down at 2025-02-07 15:20:43 UTC 2025-02-07 15:20:46.227 UTC [1] LOG: database system is ready to accept connections 2025-02-07 15:32:12.436 UTC [1] LOG: received fast shutdown request 2025-02-07 15:32:12.438 UTC [1] LOG: aborting any active transactions 2025-02-07 15:32:12.438 UTC [65] FATAL: terminating connection due to administrator command 2025-02-07 15:32:12.438 UTC [65] STATEMENT: select "assets"., to_json("exif") as "exifInfo", to_json("stacked_assets") as "stack" from "assets" left join "exif" on "assets"."id" = "exif"."assetId" left join "asset_stack" on "asset_stack"."id" = "assets"."stackId" left join lateral (select "asset_stack"., count("stacked") as "assetCount" from "assets" as "stacked" where "stacked"."stackId" = "asset_stack"."id" group by "asset_stack"."id") as "stacked_assets" on "asset_stack"."id" is not null where "assets"."ownerId" = $1::uuid and "isVisible" = $2 and "updatedAt" <= $3 and "assets"."id" > $4 order by "assets"."id" limit $5 2025-02-07 15:32:12.439 UTC [1] LOG: background worker "logical replication launcher" (PID 37) exited with exit code 1 2025-02-07 15:32:12.446 UTC [32] LOG: shutting down 2025-02-07 15:32:12.478 UTC [1] LOG: database system is shut down Trying it:
psql -U postgres -h localhost -d immich
psql (14.10 (Debian 14.10-1.pgdg120+1))
Type "help" for help.

immich=# VACUUM (FULL, ANALYZE);
psql -U postgres -h localhost -d immich
psql (14.10 (Debian 14.10-1.pgdg120+1))
Type "help" for help.

immich=# VACUUM (FULL, ANALYZE);
started everything up again without changing the zfs recordsize on the pool with the db.
bo0tzz
bo0tzz3mo ago
Approx how long did that take to finish?
satmandu
satmanduOP3mo ago
just a few minutes postgres is still pegging a cpu core. (when I have the android app open)
Zeus
Zeus3mo ago
How is the ZFS dataset passed to Postgres? What’s your setup like
satmandu
satmanduOP3mo ago
from zfs list:
rpool/non-root-immich 7.43G 638G 7.43G /home/immich/non-root-immich
rpool/non-root-immich 7.43G 638G 7.43G /home/immich/non-root-immich
(postgres is running as root, obviously)
Zeus
Zeus3mo ago
Ok so you’re running ZFS on bare metal and mounting that volume to docker?
satmandu
satmanduOP3mo ago
at least starting as root
Zeus
Zeus3mo ago
No VM or network share
satmandu
satmanduOP3mo ago
I am using the aforementioned docker-compose.yml file And using systemd to start things up thus:
Description=Immich Server
After=network-online.target zfs.target docker.service gpu-manager.service
Requires=docker.service

[Service]
Restart=always
Type=simple
# Following is to avoid Redis errors. See https://stackoverflow.com/questions/43843197/how-to-fix-the-warnings-when-running-the-redisalpine-docker-image
ExecStartPre=sysctl vm.overcommit_memory=1
# ExecStartPre=docker pull ghcr.io/immich-app/immich-server:release
ExecStartPre=/bin/bash -c "cd /home/immich/non-root-immich && docker compose pull"
ExecStartPre=/bin/bash -c "docker compose -f /home/immich/non-root-immich/docker-compose.yml down --remove-orphans"
ExecStartPre=/bin/bash -c "docker compose -f /home/immich/non-root-immich/docker-compose.yml up -d --force-recreate"
ExecStart=/bin/bash -c "docker compose -f /home/immich/non-root-immich/docker-compose.yml up"
ExecStop=/bin/bash -c "docker compose -f /home/immich/non-root-immich/docker-compose.yml stop"

[Install]
WantedBy=multi-user.target
Description=Immich Server
After=network-online.target zfs.target docker.service gpu-manager.service
Requires=docker.service

[Service]
Restart=always
Type=simple
# Following is to avoid Redis errors. See https://stackoverflow.com/questions/43843197/how-to-fix-the-warnings-when-running-the-redisalpine-docker-image
ExecStartPre=sysctl vm.overcommit_memory=1
# ExecStartPre=docker pull ghcr.io/immich-app/immich-server:release
ExecStartPre=/bin/bash -c "cd /home/immich/non-root-immich && docker compose pull"
ExecStartPre=/bin/bash -c "docker compose -f /home/immich/non-root-immich/docker-compose.yml down --remove-orphans"
ExecStartPre=/bin/bash -c "docker compose -f /home/immich/non-root-immich/docker-compose.yml up -d --force-recreate"
ExecStart=/bin/bash -c "docker compose -f /home/immich/non-root-immich/docker-compose.yml up"
ExecStop=/bin/bash -c "docker compose -f /home/immich/non-root-immich/docker-compose.yml stop"

[Install]
WantedBy=multi-user.target
my photos are all on external SSD at a separate path (That's all local, and not on a network share.) The next thing I will try is adjusting the recordsize from the 128k default to 8k. fired everything back up. android reconnected, and postgres is hitting 100% of a core. (The android is a Pixel 6 Pro with 12 gb of ram, so hopefully that is not a bottleneck?) Would you suggest using pg_stat_statements at all to help debug this? (DB operations are not my forte... my dad spent his career on that. 😅 I think I recall some postgresql swag in the 1990s...) So this is a data point: once I enabled the syncing of some local folders on the device, more recent photos (since my last import from Google Takeout) started showing up on the device.
Mraedis
Mraedis3mo ago
Ah but yes, immich only syncs what you select, so if you select nothing then nothing will show up

Did you find this page helpful?