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
: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.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>
Are you using a hard drive for Postgres?
SSD
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?
It isn't otherwise resource limited.
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
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
Anything in the Postgres logs?
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".
You’ll have to go into the mount for the database and check the logs folder
What sort of CPU are you running on?
And how big is your Postgres db (not the Immich files)
@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
Hmm, that really shouldn't struggle as hard as it apparently is
This is a little NUC... but it does have 64gb of ram
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 changeWould want to see the logs before doing anything else first
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:
started everything up again without changing the zfs recordsize on the pool with the db.
Approx how long did that take to finish?
just a few minutes
postgres is still pegging a cpu core.
(when I have the android app open)
How is the ZFS dataset passed to Postgres? What’s your setup like
from zfs list:
(postgres is running as root, obviously)
Ok so you’re running ZFS on bare metal and mounting that volume to docker?
at least starting as root
No VM or network share
I am using the aforementioned docker-compose.yml file
And using systemd to start things up thus:
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.
Ah but yes, immich only syncs what you select, so if you select nothing then nothing will show up