502 Bad Gateway on large requests through API, too small buffers
In testing, EF employee Michael Plagge produced a 502 error while attempting to navigate to the next tab after filling in working groups in the membership enrollment form:
###.###.###.### - - [26/Aug/2021:13:20:40 +0000] "GET /api/form/8aa89ddf7b7e7731017b8299ec580008/working_groups HTTP/1.1" 200 2 "https://membership.eclipse.org/application" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36" "###.###.###.###, ###.###.###.###"
2021/08/26 13:21:26 [error] 12#12: *580 upstream sent too big header while reading response header from upstream, client: ###.###.###.###, server: localhost, request: "POST /api/form/8aa89ddf7b7e7731017b8299ec580008/working_groups HTTP/1.1", upstream: "http://[::1]:8090/api/form/8aa89ddf7b7e7731017b8299ec580008/working_groups", host: "membership.eclipse.org", referrer: "https://membership.eclipse.org/application"
2021/08/26 13:21:26 [warn] 12#12: *580 upstream server temporarily disabled while reading response header from upstream, client: ###.###.###.###, server: localhost, request: "POST /api/form/8aa89ddf7b7e7731017b8299ec580008/working_groups HTTP/1.1", upstream: "http://[::1]:8090/api/form/8aa89ddf7b7e7731017b8299ec580008/working_groups", host: "membership.eclipse.org", referrer: "https://membership.eclipse.org/application"
###.###.###.### - - [26/Aug/2021:13:21:26 +0000] "POST /api/form/8aa89ddf7b7e7731017b8299ec580008/working_groups HTTP/1.1" 502 559 "https://membership.eclipse.org/application" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36" "###.###.###.###, ###.###.###.###"
As an Nginx proxy is used to direct requests, attention needs to be paid to the buffer size of the requests. While we locally had set some larger proxies, this does not seem to have translated to the production instance of nginx.