Gateway Timeout with AWS ALB
oauth2_proxy version: 2.2
OS: Ubuntu 16.04
authentication: Google G Suite
non-default cookie settings: cookie-refresh=1h
I'm running oauth2_proxy in front of some sensitive services that I want to lock down to specific Google groups. The hosts are behind an AWS Application Load Balancer configured to contact the host directly on port 4180 (http). It works fine sometimes, but often what happens is that I get a 504 Gateway Timeout after waiting a minute.
I've sometimes been able to get past this by opening the url in a private browser session, or by clearing cookies specific to that site. Sometimes it will start responding after 3 tries, sometimes never.
Is there anything further I can do to troubleshoot this issue?
Hi, @sprice-janrain, have you found out solution to the issue? I think I've encountered the same. If I send requests to oauth2_proxy directly, everything is ok, however, behind ALB sometimes requests time out.
@jakubkulhan I solved the issue by increase ALB timeout value. Hope it helps. https://www.terraform.io/docs/providers/aws/r/lb.html#idle_timeout
@andycui66 does that mean it takes 1m plus to connect? I found in my case only 1 of the LBs of my ALB ips was failing, the other one works. (tested using curl loops)
@pecigonzalo in my case, yes. It sometimes take more than 1 min for server to response.