Pinned files on remote Azure VM sometimes gateway timeout when using the ipfs.io gateway

I just set up an Azure VM, and followed this article to set up the IPFS node on the VM. Set up IPFS node on the server - Michal Zalecki

I then pinned two folders - one is a folder of metadata, the other of images

When using the ipfs.io gateway, some of the files are accessible, some aren’t and run into gateway timeout issues.

Here’s an image that is served almost instantly 0.webp (1200×1200) (ipfs.io)

And here’s one that times out
100.webp (1200Ă—1200) (ipfs.io)

Here’s a piece of metadata that successfully returns
https://ipfs.io/ipfs/QmXSfArLAJAsnU4SPSZgJWudwDiiVDRRPuRY7oKxW3FpcT/0/30.json

and one that isn’t

https://ipfs.io/ipfs/QmXSfArLAJAsnU4SPSZgJWudwDiiVDRRPuRY7oKxW3FpcT/0/0.json

Does anyone have experience running IPFS on a remote VM? The fact that some pieces of data are accessible and some aren’t makes me think it’s not a port issue, rather an Azure issue, but I’m really not sure.

Did you turn on the accelerated DHT client? It’s necessary if you serve more than a handful of files.

ipfs config --json Experimental.AcceleratedDHTClient true

You’re a genius - it’s working amazingly now. Are there any downsides to this being true? “Experimental” has me curious, but it’s blazing fast now!!

It was flagged as experimental when it came out, but it’s been around for quite a few versions now, and it’s pretty stable. The downside is that it causes high CPU load and network traffic for 5 mins every hour (when it scans the DHT network). But, if your server can take it, it’s far superior to the normal client.

Actually, i take it back. I tested it more, and the first few assets I tried to access via the ipfs.io gateway were great, but some still hang indefinitely.

Here’s the root CID for a folder i’ve added to IPFS on my remote vm QmUB1NKxDE83ttx84djC88sDLexmfkt2RcbGzA2sFNBmSa

ipfs dht findprovs QmUB1NKxDE83ttx84djC88sDLexmfkt2RcbGzA2sFNBmSa gives me 12D3KooW9sJW12wrpN6c6trvvW5ypUVGkmj2Wgc2fmerK3jFYJrL

but ipfs dht findpeer 12D3KooW9sJW12wrpN6c6trvvW5ypUVGkmj2Wgc2fmerK3jFYJrL gives me
Error: routing: not found.

Is this possibly a NAT / routing issue? I thought that a single VM wouldn’t have a NAT by default, I haven’t set one up. Or can you just not search for a peer from the node that’s actually serving the data?

Correct, when doing findpeer, or a remote ipfs id, you must do it from another node. I tried ipfs id on that peer id and got a timeout. Either your node is no longer running, or it is not reachable (firewall, NAT, etc). Use this for testing if you don’t have another node:

IPFS Check