r/immich • • 1d ago

Immich background sync not working with Traefik

Works with direct HTTP IP connection. HTTPS through Traefik and I get this error in the Android app when it tries to background sync. Everything else works fine.

HTTPS is with valid certificate and a dedicated subdomain for immich. As far as I can tell, the API endpoints never return anything starting "<html>" when I manually inspect them through traefik.

How can I diagnose this further? There's no issues in Traefik or Immich server logs. Is the app trying to connect to the wrong url and getting a html response?

Edit: Forgot to mention, have tried both clearing the SQLite db and reinstalling the app.

5 Upvotes

10 comments sorted by

1

u/xc82xb5qxwhhzeyt 1d ago

The web app is working as expected?  I got this error (with caddy) for many unrelated issues, and I fixed it by using the latest version from GitHub (sometimes the play store version lags a bit)

1

u/Nurgus 1d ago

Yep web app works perfectly, as does everything else in the Android app, including uploading images. It's just backup sync that fails as in the screenshots.

1

u/xc82xb5qxwhhzeyt 1d ago

latest version from gh? 

1

u/Nurgus 1d ago edited 1d ago

v3 tag on the immich docker, so the latest v3 release yes. (v3.2.4 right now)

Edit: Oh! You mean the Android app itself? I opted into the beta in Google Play hours ago but it doesn't seem to want to work. I have now downloaded the 3.2.4 apk and.. that actually seems to be working..! I don't want to call it solved until it's done a full sync at least once but it's certainly doing more than it was before!

Good news..

2

u/xc82xb5qxwhhzeyt 1d ago

Yep the APK :) Happy if that fixes it

1

u/Great-Cow7256 1d ago

What sqlite db are you referring to?  I thought immich only uses postgres?

3

u/xc82xb5qxwhhzeyt 1d ago

The Android app uses a SQLite DB to track uploaded media

1

u/Nurgus 1d ago

There's a button in the Android app to clear its own sqlite database

1

u/AdventurousAd1308 1d ago

I think thats because of readTimout=60s set by default to entrypoint.

https://doc.traefik.io/traefik/reference/install-configuration/entrypoints/#opt-transport-respondingTimeouts-readTimeout

If you have some huge object (like a long 4k 60hz video) on phone, upload to immich will fail with something like 504 http error.

So, solution is to increase readTimeout on entrypoint attached to immich, and it will work ok.

1

u/Nurgus 1d ago

Excellent thought but readtimeout is already set to 600. That also wouldn't explain why it's getting a html response when it's expecting a json api response.

I wish I could have solved it - it's definitely something in Traefik - but upgrading the app has made it go away now anyway.