Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipfs.add call takes about 15 seconds #128

Closed
owocki opened this issue Jul 18, 2018 · 8 comments
Closed

ipfs.add call takes about 15 seconds #128

owocki opened this issue Jul 18, 2018 · 8 comments

Comments

@owocki
Copy link

owocki commented Jul 18, 2018

https://ipfs.infura.io:5001/api/v0/add takes about 15 seconds to respond.

here is some code you can use to repro

curl 'https://ipfs.infura.io:5001/api/v0/add' -H 'accept: application/json' -H 'Referer: http://localhost:8000/tip/send/2' -H 'Origin: http://localhost:8000' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36' -H 'DNT: 1' -H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundary9nHKdiDDbbCoFDCP' --data-binary $'------WebKitFormBoundary9nHKdiDDbbCoFDCP\r\nContent-Disposition: form-data; name="file"; filename="blob"\r\nContent-Type: application/octet-stream\r\n\r\nTesting...\r\n------WebKitFormBoundary9nHKdiDDbbCoFDCP--\r\n' --compressed

here is the response

0.02s user 0.01s system 0% cpu 16.540 total
@ncocchiaro
Copy link
Contributor

Thanks for reporting, we're currently investigating the problem.

@InVincible2016
Copy link

I've been consistently getting 504 gateway time-out errors when tried to add contents to IPFS today.

@ncocchiaro
Copy link
Contributor

We saw the timeouts and are working on fixing them too.

@ncocchiaro
Copy link
Contributor

The issues with timeouts should be resolved.

@owocki
Copy link
Author

owocki commented Jul 21, 2018

fwiw; i'm still seeing about 10-25 second response times here.

kevinowocki@local /Users/kevinowocki/Sites/gitcoin/kudos-badges~ % time !!                                                                                                                 (git)-[master] :
time curl 'https://ipfs.infura.io:5001/api/v0/add' -H 'accept: application/json' -H 'Referer: https://gitcoin.co/new' -H 'Origin: https://gitcoin.co' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36' -H 'DNT: 1' -H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryXOw0kAe9rKUO9EBW' --data-binary $'------WebKitFormBoundaryXOw0kAe9rKUO9EBW\r\nContent-Disposition: form-data; name="file"; filename="blob"\r\nContent-Type: application/octet-stream\r\n\r\n{"payload":{"title":"test 123","description":"test 123","sourceFileName":"","sourceFileHash":"","sourceDirectoryHash":"","issuer":{"name":"Kevin Owocki","email":"[email protected]","githubUsername":"owocki","address":"0x00de4b13153673bcae2616b67bf822500d325fc3"},"schemes":{"project_type":"traditional","permission_type":"permissionless"},"hiring":{"jobDescription":""},"privacy_preferences":{"show_email_publicly":"1","show_name_publicly":"1"},"funders":[],"categories":["Python"," HTML"," Shell"],"created":1532039130,"webReferenceURL":"https://github.com/owocki/pytrader/issues/118","metadata":{"issueTitle":"test 123","issueDescription":"test 123","issueKeywords":"Python, HTML, Shell","githubUsername":"owocki","notificationEmail":"[email protected]","fullName":"Kevin Owocki","experienceLevel":"Beginner","projectLength":"Hours","bountyType":"Other","tokenName":"ETH"},"tokenName":"ETH","tokenAddress":"0x0000000000000000000000000000000000000000","expire_date":1532643930},"meta":{"platform":"gitcoin","schemaVersion":"0.1","schemaName":"gitcoinBounty"}}\r\n------WebKitFormBoundaryXOw0kAe9rKUO9EBW--\r\n' --compressed
{"Name":"blob","Hash":"QmNxG49Ju4vVfFi4xfNRFQGX6mNEBq8dsggMeuX3Y9K8jz","Size":"1073"}
curl 'https://ipfs.infura.io:5001/api/v0/add' -H 'accept: application/json' -  0.02s user 0.01s system 0% cpu 10.975 total
kevinowocki@local /Users/kevinowocki/Sites/gitcoin/kudos-badges~ % time curl 'https://ipfs.infura.io:5001/api/v0/add' -H 'accept: application/json' -H 'Referer: https://gitcoin.co/new' -H 'Origin: https://gitcoin.co' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36' -H 'DNT: 1' -H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryXOw0kAe9rKUO9EBW' --data-binary $'------WebKitFormBoundaryXOw0kAe9rKUO9EBW\r\nContent-Disposition: form-data; name="file"; filename="blob"\r\nContent-Type: application/octet-stream\r\n\r\n{"payload":{"title":"test 123","description":"test 123","sourceFileName":"","sourceFileHash":"","sourceDirectoryHash":"","issuer":{"name":"Kevin Owocki","email":"[email protected]","githubUsername":"owocki","address":"0x00de4b13153673bcae2616b67bf822500d325fc3"},"schemes":{"project_type":"traditional","permission_type":"permissionless"},"hiring":{"jobDescription":""},"privacy_preferences":{"show_email_publicly":"1","show_name_publicly":"1"},"funders":[],"categories":["Python"," HTML"," Shell"],"created":1532039130,"webReferenceURL":"https://github.com/owocki/pytrader/issues/118","metadata":{"issueTitle":"test 123","issueDescription":"test 123","issueKeywords":"Python, HTML, Shell","githubUsername":"owocki","notificationEmail":"[email protected]","fullName":"Kevin Owocki","experienceLevel":"Beginner","projectLength":"Hours","bountyType":"Other","tokenName":"ETH"},"tokenName":"ETH","tokenAddress":"0x0000000000000000000000000000000000000000","expire_date":1532643930},"meta":{"platform":"gitcoin","schemaVersion":"0.1","schemaName":"gitcoinBounty"}}\r\n------WebKitFormBoundaryXOw0kAe9rKUO9EBW--\r\n' --compressed
{"Name":"blob","Hash":"QmNxG49Ju4vVfFi4xfNRFQGX6mNEBq8dsggMeuX3Y9K8jz","Size":"1073"}
curl 'https://ipfs.infura.io:5001/api/v0/add' -H 'accept: application/json' -  0.02s user 0.01s system 0% cpu 9.883 total
kevinowocki@local /Users/kevinowocki/Sites/gitcoin/kudos-badges~ % time curl 'https://ipfs.infura.io:5001/api/v0/add' -H 'accept: application/json' -H 'Referer: https://gitcoin.co/new' -H 'Origin: https://gitcoin.co' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36' -H 'DNT: 1' -H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryXOw0kAe9rKUO9EBW' --data-binary $'------WebKitFormBoundaryXOw0kAe9rKUO9EBW\r\nContent-Disposition: form-data; name="file"; filename="blob"\r\nContent-Type: application/octet-stream\r\n\r\n{"payload":{"title":"test 123","description":"test 123","sourceFileName":"","sourceFileHash":"","sourceDirectoryHash":"","issuer":{"name":"Kevin Owocki","email":"[email protected]","githubUsername":"owocki","address":"0x00de4b13153673bcae2616b67bf822500d325fc3"},"schemes":{"project_type":"traditional","permission_type":"permissionless"},"hiring":{"jobDescription":""},"privacy_preferences":{"show_email_publicly":"1","show_name_publicly":"1"},"funders":[],"categories":["Python"," HTML"," Shell"],"created":1532039130,"webReferenceURL":"https://github.com/owocki/pytrader/issues/118","metadata":{"issueTitle":"test 123","issueDescription":"test 123","issueKeywords":"Python, HTML, Shell","githubUsername":"owocki","notificationEmail":"[email protected]","fullName":"Kevin Owocki","experienceLevel":"Beginner","projectLength":"Hours","bountyType":"Other","tokenName":"ETH"},"tokenName":"ETH","tokenAddress":"0x0000000000000000000000000000000000000000","expire_date":1532643930},"meta":{"platform":"gitcoin","schemaVersion":"0.1","schemaName":"gitcoinBounty"}}\r\n------WebKitFormBoundaryXOw0kAe9rKUO9EBW--\r\n' --compressed
{"Name":"blob","Hash":"QmNxG49Ju4vVfFi4xfNRFQGX6mNEBq8dsggMeuX3Y9K8jz","Size":"1073"}
curl 'https://ipfs.infura.io:5001/api/v0/add' -H 'accept: application/json' -  0.02s user 0.01s system 0% cpu 28.106 total

@kartojal
Copy link

kartojal commented Aug 21, 2018

Having issues today adding files using Infura IPFS provider, maybe is related. First it took near a minute to upload a 13kb file this morning, then it stopped working, i'm receiving 504 gateway timeout errors when doing POST.

Edit: Now it works again! 😄

@ncocchiaro
Copy link
Contributor

We deployed a new backend architecture for our IPFS endpoint and are no longer seeing this kind of timing on adds. Closing this issue for now.

@rogargon
Copy link

rogargon commented Mar 7, 2019

This problem has appeared again. I'm experiencing it with all my uses of https://ipfs.infura.io:5001/api/v0/add in different projects, including indirect uses from libraries like uport-connect.

It can be reproduced using the original curl command with which @owocki opened this issue:

curl 'https://ipfs.infura.io:5001/api/v0/add' -H 'accept: application/json' -H 'Referer: http://localhost:8000/tip/send/2' -H 'Origin: http://localhost:8000' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36' -H 'DNT: 1' -H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundary9nHKdiDDbbCoFDCP' --data-binary $'------WebKitFormBoundary9nHKdiDDbbCoFDCP\r\nContent-Disposition: form-data; name="file"; filename="blob"\r\nContent-Type: application/octet-stream\r\n\r\nTesting...\r\n------WebKitFormBoundary9nHKdiDDbbCoFDCP--\r\n' --compressed```

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

No branches or pull requests

5 participants