-
Notifications
You must be signed in to change notification settings - Fork 489
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
Pinning to Pinata disabled due to "Rate limit exceeded" #1900
Comments
@RubenKelevra I think it's related to your API token: it's either expired or doesn't have the required permissions (Pinning API permissions). |
Well, the token is new and has all permissions active. |
@RubenKelevra any updates on this? |
Hey @hacdias, sorry for the delay. I think the issue was related to my ISP - it's working fine now without any change 🤷 Thanks for the efforts to help me, highly appreciated! |
FWIW I noticed similar problem while testing webui in ipfs-desktop and clicking between settings and files. Poked at things and this.. is not false-negative. Pinata is rate-limiting, and HTTP checks sent by $ ipfs pin remote service ls --stat ~
Pinata https://api.pinata.cloud/psa 0/0/11/0
estuary https://api.estuary.tech/pinning 14/14/1/0
pinata-debug http://127.0.0.1:5000/psa invalid
pinata-test https://testapi.pinata.cloud/psa 0/0/16/5
$ ipfs pin remote service ls --stat ~
Pinata https://api.pinata.cloud/psa invalid
estuary https://api.estuary.tech/pinning 14/14/1/0
pinata-debug http://127.0.0.1:5000/psa invalid
pinata-test https://testapi.pinata.cloud/psa invalid I suspect that if you switch from Settings to Files, and try to pin something you hit the rate limit quite often. Low level error can be reproduced with $ curl -H "Authorization: Bearer secret" "https://api.pinata.cloud/psa/pins?limit=1&status=failed"
{"count":0,"results":[]}
$ curl -H "Authorization: Bearer secret" "https://api.pinata.cloud/psa/pins?limit=1&status=failed"
{"count":0,"results":[]}
$ curl -H "Authorization: Bearer secret" "https://api.pinata.cloud/psa/pins?limit=1&status=failed"
{"count":0,"results":[]}
$ curl -H "Authorization: Bearer secret" "https://api.pinata.cloud/psa/pins?limit=1&status=failed"
{"count":0,"results":[]}
$ curl -H "Authorization: Bearer secret" "https://api.pinata.cloud/psa/pins?limit=1&status=failed"
{"count":0,"results":[]}
$ curl -H "Authorization: Bearer secret" "https://api.pinata.cloud/psa/pins?limit=1&status=failed"
{"error":{"reason":"Rate limit exceeded","details":"You have exceeded the API rate limit. Wait a minute and slow down your requests."}} @obo20 any suggestions how we avoid triggering this rate limiter?
|
@lidel yeah, I can confirm that I still have issues. It jumped back to "Failed to fetch". So I created a new key, and when I add it shows that it was working and but it jumps to "Failed to fetch" when I turn on auto-upload. So not sure if pinata doesn't want users to use their pin-service or if that's an IPFS issue but it's kind of annoying since I have to manually upload everything to their service. |
I wonder if we need to add support for Pinata returns:
Open question if $ ipfs pin remote ls --service=Pinata
Error: reason: "Rate limit exceeded", details: "You have exceeded the API rate limit. Wait a minute and slow down your requests.": 429 Too Many Requests |
This is bare minimum to restore remote pinning with rate-limited Pinata. Details in #1900 (comment) - The expensive 'ipfs pin remote service ls --stat' and autopin MFS policy is executed only on Settings screen - Files screen does not make any requests to remote pinning service anymore. - Remote pin status check is triggered by opening "Set pinning" modal via context menu or the pin icon, or by clicking on "Pin Status" column header. – We cache aggressively and assume pins on remote service are not changed by other means. The cache lives in memore, reloading the webui will purge cached states. - Clicking on "Pin Status" header bypassess remote pin status cache and forces online status re-check for all items in current directory. - Errors returned by pinning service are now correctly reported to the user. The CLI and ipfs-webui users will now see the same error message.
This is bare minimum to restore remote pinning with rate-limited Pinata. Details in #1900 (comment) - The expensive 'ipfs pin remote service ls --stat' and autopin MFS policy is executed only on Settings screen - Files screen does not make any requests to remote pinning service anymore. - Remote pin status check is triggered by opening "Set pinning" modal via context menu or the pin icon, or by clicking on "Pin Status" column header. – We cache aggressively and assume pins on remote service are not changed by other means. The cache lives in memore, reloading the webui will purge cached states. - Clicking on "Pin Status" header bypassess remote pin status cache and forces online status re-check for all items in current directory. - Errors returned by pinning service are now correctly reported to the user. The CLI and ipfs-webui users will now see the same error message.
this leverages createCacheBundle (src/bundles/index.js) and persistActions (src/bundles/pinning.js) for persisting remote pin states across page reloads new users should not see any functional difference, old users may need to manually go to "Set pinning" to trigger status fetch, but that is the best we can do and a fair compromise, given that before this remote pins at Pinata did not work at all due to throttling (#1900)
* refactor: on-demand remote pin status This is bare minimum to restore remote pinning with rate-limited Pinata. Details in #1900 (comment) - The expensive 'ipfs pin remote service ls --stat' and autopin MFS policy is executed only on Settings screen - Files screen does not make any requests to remote pinning service anymore. - Remote pin status check is triggered by opening "Set pinning" modal via context menu or the pin icon, or by clicking on "Pin Status" column header. – We cache aggressively and assume pins on remote service are not changed by other means. The cache lives in memory, reloading the webui will purge cached states. - Clicking on "Pin Status" header bypasses remote pin status cache and forces online status re-check for all items in current directory. - Errors returned by pinning service are now correctly reported to the user. The CLI and ipfs-webui users will now see the same error message. * refactor: IndexedDB persistence of remote pins this leverages createCacheBundle (src/bundles/index.js) and persistActions (src/bundles/pinning.js) for persisting remote pin states across page reloads new users should not see any functional difference, old users may need to manually go to "Set pinning" to trigger status fetch, but that is the best we can do and a fair compromise, given that before this remote pins at Pinata did not work at all due to throttling (#1900) * refactor(i18n): new key to force new translation added two variables, and old key had none. using a different key ensures users use English instead of old translation
@RubenKelevra recent changes in ipfs-webui v2.15.0 should restore remote pinning functionality even when using throttled service like Pinata (which I confirmed to be 6 requests per minute). You can try it at https://webui.ipfs.io (needs CORS safelisting) for now, |
Thanks for the fast fix! :) |
@lidel can we remove the pinned flag? |
Describe the bug
Pinata integration stopped working. So it worked before and after some update in the recent past it stopped working. I thought it's a temporary outage as I saw it first. But that's quite a while ago, maybe a month or two, and it's still not working.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The integrated service connection should work.
Screenshots
The text was updated successfully, but these errors were encountered: