Invalid http response 504 in upload response (Perkeep Uploader (Android))

37 views
Skip to first unread message

tgulacsi78

unread,
Sep 29, 2019, 3:08:09 AM9/29/19
to Perkeep
Just a reminder to my future me and anybody using Perkeep behind Nginx.

If your Uploader stops with such warning:

2019/09/29 05:15:21 Warning: error uploading file map after finding server dup of [sha224-d50aa95f42fb2b35264e644e72e076dc6e81b5a44e11432f9ceb3c90]: invalid http response 504 in upload response
2019/09/29 05:16:09 Warning: error uploading file map after finding server dup of [sha224-87c3913de42d997f3cd9ad8366083f2ee3a8870df30b5b00fada895b]: invalid http response 504 in upload response
2019/09/29 05:18:51 Warning: error uploading file map after finding server dup of [sha224-67f38797dfb0f07c7969246fb5aad8791df39aa2877f74236fe90815]: invalid http response 504 in upload response
2019/09/29 05:19:12 Error uploading /storage/0123-4567/DCIM/Camera/VID_20181018_165640.mp4: invalid http response 504 in upload response

It's the Nginx which responds with 504 when it thinks that the Perkeep server does not respond (in time).

When I tested those urls with HEAD, it did respond, just not promptly enough for the default 60s nginx timeout.

So set a long "proxy_read_timeout" in your nginx config!


Sorry for the noise!
Tamás Gulácsi

tgulacsi78

unread,
Sep 29, 2019, 3:13:27 AM9/29/19
to Perkeep
Another nginx solution if webhooks does not work (UI doesn't update automatically and has "Server disconnected") in the menu:
nginx needs to enable webhooks explicitly:

map $http_upgrade $connection_upgrade {
  default upgrade;
  '' close;
}
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;

Mathieu Lonjaret

unread,
Sep 29, 2019, 6:12:21 PM9/29/19
to per...@googlegroups.com
Cool. I think I hadn't managed to make websockets work by default when
I was trying to improve the packaging of Perkeep for Synology. So this
is good to know, if I ever come back to that.

I personally use Traefik instead of Nginx (yes, I am biased), and I
forgot to come back to debugging why websockets were broken for
Perkeep in that case as well.
> --
> You received this message because you are subscribed to the Google Groups "Perkeep" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to perkeep+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/perkeep/c5b267cc-bc71-47b4-aa63-48506153fe31%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages