We're hosting gunicorn behind an ELB with idle timeout of 120 seconds.
I think this is leading to sporatic 504 errors:
https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/ts-elb-error-message.html
> HTTP 504: Gateway timeout
> Cause 2: Registered instances closing the connection to Elastic Load Balancing.
> Solution 2: Enable keep-alive settings on your EC2 instances and make sure that the keep-alive timeout is greater than the idle timeout settings of your load balancer.
Related reading: https://serverfault.com/questions/782022/keepalive-setting-for-gunicorn-behind-elb-without-nginx
Not 100% this is appropriate for setups without ELB but let's deploy,
see if it makes a dent on monitoring and then move appropriately (e.g.
env variable this)