I recently experienced a network-related issue on my Elastic Beanstalk instance which I'm not sure how to troubleshoot.
My instance makes network requests to an API (let's call it api.site.com) which is fronted by Cloudflare. All of a sudden, I started getting network timeouts when my instance tried connecting to CF.
Aug 21 18:57:11 ip-172-30-1-243 web[3627024]: Error: connect ETIMEDOUT 172.66.43.194:443
Aug 21 18:57:11 ip-172-30-1-243 web[3627024]: at createConnectionError (node:net:1656:14)
Aug 21 18:57:11 ip-172-30-1-243 web[3627024]: at Timeout.internalConnectMultipleTimeout (node:net:1715:38)
Aug 21 18:57:11 ip-172-30-1-243 web[3627024]: at listOnTimeout (node:internal/timers:596:11)
Aug 21 18:57:11 ip-172-30-1-243 web[3627024]: at process.processTimers (node:internal/timers:529:7) {
Aug 21 18:57:11 ip-172-30-1-243 web[3627024]: code: 'ETIMEDOUT'
172.66.43.194:443 is a Cloudflare IP.
I was able to connect to api.site.com via my browser.
My Elastic Beanstalk's security group outbound rules allow for all HTTP and HTTPS traffic.
I tried rebooting my instance to no avail.
AWS reported my instance as healthy.
Luckily the issue resolved itself after a few hours, but I'm concerned it will happen at random again, so I want to be better prepared.
I'm looking for tips on what troubleshooting steps I can take next time this happens.