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

Comments

@owocki
Copy link

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
owocki added a commit to gitcoinco/web that referenced this issue Jul 18, 2018
@ncocchiaro

This comment has been minimized.

Copy link
Contributor

commented Jul 18, 2018

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

@InVincible2016

This comment has been minimized.

Copy link

commented Jul 20, 2018

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

@ncocchiaro

This comment has been minimized.

Copy link
Contributor

commented Jul 20, 2018

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

@ncocchiaro

This comment has been minimized.

Copy link
Contributor

commented Jul 20, 2018

The issues with timeouts should be resolved.

@owocki

This comment has been minimized.

Copy link
Author

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":"ksowocki@gmail.com","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":"ksowocki@gmail.com","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":"ksowocki@gmail.com","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":"ksowocki@gmail.com","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":"ksowocki@gmail.com","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":"ksowocki@gmail.com","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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor

commented Aug 30, 2018

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.

@ncocchiaro ncocchiaro closed this Aug 30, 2018
@rogargon

This comment has been minimized.

Copy link

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
Projects
None yet
5 participants
You can’t perform that action at this time.