I am writing this post to document a weird behaviour with Fly and Cloudflare together. I added Cloudflare in front of my app with a proxied ipv6 AAAA record. Using this approach Cloudfalre will add an A record automatically for end users. Using this method is necessary if you want to use Cloudflare proxy and have a shared ipv4 for your app.
This worked fine for the first few days but then i found some requests erroring with code 523 sometimes. I think this problem is caused by some Cloudflare servers not having ipv6 support, which is common where I am now (Italy).
I think adding an A record with an dedicated ipv4 IP fixed the issue, will see.