Gateway timeout if pin add via api

After I uploaded the file to the kubo private environment that I started, I pin the file to infura through the api (pin/add), but the gateway timeout kept being returned. It can be accessed by using{cid}.

curl -v -X POST -u "xxx:yyy" ""
*   Trying
* Connected to ( port 5001 (#0)
* ALPN: offers h2
* ALPN: offers http/1.1
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN: server did not agree on a protocol. Uses default.
* Server certificate:
*  subject:
*  start date: May 15 00:00:00 2023 GMT
*  expire date: Jun 12 23:59:59 2024 GMT
*  subjectAltName: host "" matched cert's ""
*  issuer: C=US; O=Amazon; CN=Amazon RSA 2048 M01
*  SSL certificate verify ok.
* Server auth using Basic with user 'xxx'
> POST /api/v0/pin/add?arg=QmNrTy9XFyMYJifcdFjKVFUgMV1CHsHHyKBRNoGdeNBJHU HTTP/1.1
> Host:
> Authorization: Basic xxxyyy
> User-Agent: curl/7.86.0
> Accept: */*
* Mark bundle as not supporting multiuse
< HTTP/1.1 504 Gateway Timeout
< Content-Type: text/plain; charset=utf-8
< Vary: Origin
< X-Content-Type-Options: nosniff
< X-Robots-Tag: noindex
< Date: Mon, 31 Jul 2023 06:38:20 GMT
< Content-Length: 16
Gateway Timeout
* Connection #0 to host left intact
1 Like

Do we need to add infura’s peer address to our own kubo’s bootstrap or peer configuration? If yes, how do I know what is the address value of infura’s bootstrap or peer?


okay,i really need to know too. some help will do

1 Like

It’s a matter of content propagation, if that’s only on your kubo node then it might take some time until Infura it’s going to see it - we’re also working on a mechanism that should considerably improve the fetching time. We don’t expose any peering information I’m afraid, the architecture is far more complicated than just a bunch of ipfs nodes and some peer info wouldn’t help.
I’ve noticed that if you try to fetch that CID with or it will be see faster by Infura.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.