I
Immich•2y ago
ahbeng

Immich-Proxy timing out for 1st time setup Android app "Building Timeline"

It seems that the nginx timing out for a first time setup of the Immich Android app. Getting these in the Immich-Proxy logs: 2023/05/27 02:10:14 [error] 40#40: *196 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.147.17.20, server: , request: "GET /api/asset HTTP/1.1", upstream: "http://172.18.0.7:3001/asset", host: "10.147.17.2:2283" I tried to update the /etc/nginx/conf.d/default.conf file but I can't as its not writable with the nginx user.
31 Replies
Alex Tran
Alex Tran•2y ago
nginx timing out for a first time setup of the Immich Android app.
I think this is unrelated to the android app Are you seeing the Android app's building timeline keep going on?
ahbeng
ahbengOP•2y ago
Yep. Immich-Web is fine. lemme try to get my wife's iPad Prod...
Alex Tran
Alex Tran•2y ago
Have you choose an album/folder in the backup page yet?
ahbeng
ahbengOP•2y ago
yep to an album that only has 1 image in the backup that show up after a while and only that 1 image
Alex Tran
Alex Tran•2y ago
Which phone model is this?
ahbeng
ahbengOP•2y ago
Samsung Galaxy S22
ahbeng
ahbengOP•2y ago
Stack Overflow
NGINX: upstream timed out (110: Connection timed out) while reading...
I have Puma running as the upstream app server and Riak as my background db cluster. When I send a request that map-reduces a chunk of data for about 25K users and returns it from Riak to the app, ...
Alex Tran
Alex Tran•2y ago
So you are seeing the local assets sometimes show up but not the remote assets that were on the server, correct?
ahbeng
ahbengOP•2y ago
i do have a lot in my libarary - at almost 200K+ obj local assets always shows up but not the remote assets
Alex Tran
Alex Tran•2y ago
Are you accessing with your local IP or over DNS?
ahbeng
ahbengOP•2y ago
i'm actuallly over Zerotier VPN as I wanted to access it outside lemme try a to switch to a the local network
Alex Tran
Alex Tran•2y ago
Yes, let's try that first
ahbeng
ahbengOP•2y ago
same thing: 2023/05/27 02:30:54 [error] 41#41: *103 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.86.199, server: , request: "GET /api/asset HTTP/1.1", upstream: "http://172.18.0.7:3001/asset", host: "192.168.86.7:2283"
Alex Tran
Alex Tran•2y ago
@zody probably we run into resources management here šŸ¤”
ahbeng
ahbengOP•2y ago
hmm... lemme try to override: 20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/default.conf.template to /etc/nginx/conf.d/default.conf to add proxy_read_timeout 3600;
Alex Tran
Alex Tran•2y ago
You probably have to rebuild the image
ahbeng
ahbengOP•2y ago
yeah.. getting permission denied as its login as nginx by default can't su or sudo lemme see if I can build it... i don't really qualify as a "dev" but more of a "hacker" lol
Alex Tran
Alex Tran•2y ago
I think you will need to clone the Immich repo, change the content then build for production
ahbeng
ahbengOP•2y ago
found a workaround... added this to the docker-compose: immich-proxy: container_name: immich_proxy image: ghcr.io/immich-app/immich-proxy:release environment: # Make sure these values get passed through from the env file - IMMICH_SERVER_URL - IMMICH_WEB_URL ports: - 2283:8080 depends_on: - immich-web labels: - "com.centurylinklabs.watchtower.monitor-only=true" volumes: - /mnt/immich/proxy/templates:/etc/nginx/templates restart: unless-stopped
Alex Tran
Alex Tran•2y ago
ah nice
ahbeng
ahbengOP•2y ago
created the conf in my host and mounted it let's see how it goes my library is huge!
Alex Tran
Alex Tran•2y ago
let me know, we can increase the timeout yeah it is not your fault, we need to find a way to handle large library like yours
ahbeng
ahbengOP•2y ago
woohoo!! works!!!
Alex Tran
Alex Tran•2y ago
Wooh nice!
ahbeng
ahbengOP•2y ago
got the timeline now yeah its default timeout... not sure to what added it here at this point: proxy_buffering off; proxy_request_buffering off; proxy_buffer_size 16k; proxy_busy_buffers_size 24k; proxy_buffers 64 4k; proxy_force_ranges on; ** proxy_read_timeout 3600;** in default.conf.template and restarted the docker-compose after mounting it
Alex Tran
Alex Tran•2y ago
This is very valuable thank you for helping us resolve this
ahbeng
ahbengOP•2y ago
yeah at 200K images.. am I the biggest yet? lol
Alex Tran
Alex Tran•2y ago
probably not we have people with like terabytes of assets šŸ˜›
ahbeng
ahbengOP•2y ago
i'm sure anyways.. yeah.. if we can increase the timeout settings at the proxy loving it!!!
Alex Tran
Alex Tran•2y ago
thanks man!
ahbeng
ahbengOP•2y ago
so in the article above: keepalive is better than timeout for better resource management? have not much of experience with this, so gonna try keepalive then... since its me and wife using I'm good with what I have. it would depend on your use case then might be best to just document to add to their docker-compose: volumes: - /mnt/immich/proxy/templates:/etc/nginx/templates and let folks update based on their use case at their default.conf.template file nope. that method suggested to keepalive didn't work at all. reverting back to proxy_read_timeout 3600;

Did you find this page helpful?