Remote follows take minutes


#1

I recently set up an instance on an AWS EC2 host, behind an SSL-terminating Amazon Elastic Load Balancer (a reverse proxy). Local activities all seem to behave correctly, but I was getting gateway timeouts trying to remote follow accounts on other instances. The only log messages I was seeing involved connections being interrupted prematurely, so in an attempt to get more troubleshooting information, I increased the HTTP connection timeouts at both the ALB and on nginx from 1 minute to 5 minutes…
and then, unexpectedly, the follows starting working. The AuthorizeInteractionController is taking anywhere between 2 to 5 minutes to return, at which point it returns a 200 with no informative logging or debugging:

method=GET path=/authorize_interaction format=html controller=AuthorizeInteractionsController action=show status=200 duration=264496.68 view=28.38 db=24.16

I tried turning of debug logging, but didn’t find this to useful…how might I go about troubleshooting?


#2

I was able to solve this problem - I removed all IPv6 addresses from the EC2 host in question (deleting the AAAA record from my DNS zone to simply prevent IPv6 from being resolved did not solve the problem).