Skip to content
This repository has been archived by the owner. It is now read-only.

Accessing non-existing hash key using REST #120

Closed
biljanaLukovic opened this issue May 11, 2016 · 6 comments
Closed

Accessing non-existing hash key using REST #120

biljanaLukovic opened this issue May 11, 2016 · 6 comments

Comments

@biljanaLukovic
Copy link

biljanaLukovic commented May 11, 2016

I have install and configured ipfs version 0.4.0. Happy path works eg. I can put an item into ipfs and retrieve it by produced hash. However, the service does not return when 'cat' looks for non existing hash code.
Example with valid hash code:
http://127.0.0.1:5001/api/v0/cat/QmckRHhKxcrp4Y2miz9hpAzFk2fepenrQCT524VYrL9LKY
Any changes in the supplied hash code will cause server to hung.
Attached is my config file.
Thanks
B
config.txt

@ghost
Copy link

ghost commented May 11, 2016

The daemon doesn't know that the requested object does not exist. It has no way to know it, and just keeps looking for it in the network.

@biljanaLukovic
Copy link
Author

biljanaLukovic commented May 11, 2016

Does this mean that web service will not return any response (like status or time out)?
Thanks

@ghost
Copy link

ghost commented May 11, 2016

It will eventually time out. The public gateway at ipfs.io times out after 30 minutes, I'm not sure what the timeout of the daemon's gateway itself is -- definitely more than 30 minutes though.

Do you want to be able to tell if an object does not exist? You could specify a request timeout with the HTTP/REST library or tool you are using.

@whyrusleeping
Copy link

whyrusleeping commented May 11, 2016

You can also add a timeout yourself with the timeout option, for example:
timeout=30s

On Wed, May 11, 2016 at 12:01 PM Lars Gierth notifications@github.com
wrote:

It will eventually time out. The public gateway at ipfs.io times out
after 30 minutes, I'm not sure what the timeout of the daemon's gateway
itself is -- definitely more than 30 minutes though.

Do you want to be able to tell if an object does not exist? You could
specify a request timeout with the HTTP/REST library or tool you are using.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#120 (comment)

@biljanaLukovic
Copy link
Author

biljanaLukovic commented May 11, 2016

Thank you lgierth. I set the read timeout on the connection and get immediate response

@madavieb
Copy link

madavieb commented May 23, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants