ImmichFrame icon indicating copy to clipboard operation
ImmichFrame copied to clipboard

Several minutes before photos display when docker restarted

Open simondsmason opened this issue 1 year ago • 14 comments

Not really an issue. When I start my docker it takes ImmichFrame about 5+ minutes to display images. During this time it timeouts and displays the "Looks like your immich-server is offline or you misconfigured immichFrame, check the container logs" message several times. Then pictures just start showing and it is fine from there on.

Logs show nothing. It looks like everything has started fine.

I have a lot of pictures in my library (100,000+) and I am using the person ID from about 30+ people. I am sure this is related? But it would be nice for it not to timeout and/or display a message about loading pictures, etc?

I didn't put this under bug or feature request as I am not sure what is going on yet? Thanks for any direction.

Running latest version .24 on unraid using the docker template in the App Store.

simondsmason avatar Apr 25 '25 14:04 simondsmason

Interesting, it is probably just fetching those assets since you have a big library. I could add some trace logging. I am currently thinking about optimizing the fetch-logic for the backend, maybe this will help in the future.

Keep an eye out for #317 :)

JW-CH avatar Apr 25 '25 14:04 JW-CH

Yes, as I said not a big deal but would be nice if it said "Loading..." or something and didn't time out?

simondsmason avatar Apr 25 '25 15:04 simondsmason

@JW-CH As a follow-up I noticed that the error is coming up after running the screen saver for a long period of time. I have it running on an iPad and many times when I wake up the next morning I see the error. Clicking refresh restarts fine. I don't know exactly when this is happening but within 24 hours presumably. Perhaps related to the previous issue?

simondsmason avatar May 09 '25 13:05 simondsmason

How are you running it on iPad? As a PWA?

3rob3 avatar May 09 '25 13:05 3rob3

I am running in a third party IOS app - Kiosker. But I have noticed the same thing in Safari native and on a number of other platforms.

simondsmason avatar May 09 '25 13:05 simondsmason

I have some further information on this. I thought the issue was related to starting the docker and how long immichframe took to load after that. It appears to be connected to the local machine. Without restarting the docker I rebooted the computer and it still took several tries to bring up the photos. Restarting the browser has no impact, but restarting the PC causes immichframe to take 2-3 attempts to load photos. This might be obvious based on what I had posted before but wanted to clarify.

simondsmason avatar May 14 '25 20:05 simondsmason

Can you try one of the desktop client apps just to get another data point and try to pinpoint this?

3rob3 avatar May 15 '25 14:05 3rob3

Running latest version - I have tested in Chrome on Windows and Safari on Mac. It appears to be related to number of images. I have several instances running with different numbers of people included and one with all of the people. When I start the all people docker and connect I get the error message several times. Load URL, wait for a number of minutes, get error, refresh, repeat. After the the third refresh the images start displaying. When I start one of the dockers with the lesser number of images then they load without an error.

simondsmason avatar May 19 '25 12:05 simondsmason

Can you try commenting out people and albums in docker, and try? Curious if it's the number of images, or the amount of people you have set.

3rob3 avatar May 19 '25 17:05 3rob3

@3rob3 It took me a while to play with this but it doesn't seem like the issue goes away with smaller person lists (which is also smaller numbers of photos). I am also running tests directly to the server using local IP and through my reverse proxy to see if that is introducing the error but so far it seems to happen regardless.

The logs don't give any information as nothing is logged when this happens. Changing the logging levels might help to diagnose this?

simondsmason avatar Aug 11 '25 08:08 simondsmason

Seems like this is a theme across platforms but since I aggravated the issue with a docker and host patch and reboot here fits. I had to force my immichframe android apps to restart @3rob3 to clear the "Looks like your immich-server is offline" error page. An aggressive retry would be amazing and preferable in my use case where I really don't have easy access to the androids on the other side of the world. Getting "stuck" and needing a human to poke it isn't ideal.

Kahn avatar Dec 15 '25 23:12 Kahn

I second this. As noted I also have remote viewers who love it. I can only resolve by sending routine refreshes to the browser (using Fully Kiosk) and hope that it resolves.

Seems like this is a theme across platforms but since I aggravated the issue with a docker and host patch and reboot here fits. I had to force my immichframe android apps to restart @3rob3 to clear the "Looks like your immich-server is offline" error page. An aggressive retry would be amazing and preferable in my use case where I really don't have easy access to the androids on the other side of the world. Getting "stuck" and needing a human to poke it isn't ideal.

simondsmason avatar Dec 16 '25 13:12 simondsmason

Seems like this is a theme across platforms but since I aggravated the issue with a docker and host patch and reboot here fits. I had to force my immichframe android apps to restart @3rob3 to clear the "Looks like your immich-server is offline" error page. An aggressive retry would be amazing and preferable in my use case where I really don't have easy access to the androids on the other side of the world. Getting "stuck" and needing a human to poke it isn't ideal.

Swiping down for settings, then closing it with no changes should fully reload the WebView.

3rob3 avatar Dec 16 '25 18:12 3rob3

Seems like this is a theme across platforms but since I aggravated the issue with a docker and host patch and reboot here fits. I had to force my immichframe android apps to restart @3rob3 to clear the "Looks like your immich-server is offline" error page. An aggressive retry would be amazing and preferable in my use case where I really don't have easy access to the androids on the other side of the world. Getting "stuck" and needing a human to poke it isn't ideal.

Swiping down for settings, then closing it with no changes should fully reload the WebView.

ok I finally got around to testing this. The issue stems from the number of assets in my immichframe setup. The initial load is taking too long and timing out on the front end browser. Also since I am running through NGINX Proxy Manager I had to increase the timeouts there as well. Interestingly Safari does not time out - but Chrome and Fully Kiosk browser timeout at 5 minutes.

As a test I updated home-page.svelte and added an automatic retry when it timed out. In the case of my test album it took 10:30 to load on Safari and under chrome it had to retry twice before loading. But this is transparent to the end user.

If there is interest I could share the code.

simondsmason avatar Dec 23 '25 00:12 simondsmason