multiversx / mx-api-service

Unified REST API facade for providing data related to the MultiversX blockchain
https://api.multiversx.com
GNU General Public License v3.0
30 stars 49 forks source link

run with error #1109

Closed sylviahuang123 closed 10 months ago

sylviahuang123 commented 1 year ago

while I run npm run start:testnet and then I can get data from port 3001(I don't know why not 4001 as readme said), but there are many error logs like these: {"context":"GithubService:Keys against database / github invalidations","level":"error","message":"An unhandled error occurred when getting Github user info for username 'ddigital'","stack":["Error: \n at OriginLogger.error (/mx-api-service/node_modules/@multiversx/sdk-nestjs-common/src/utils/origin.logger.ts:29:68)\n at GithubService.getUserInfo (/mx-api-service/src/common/github/github.service.ts:33:19)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at KeybaseService.getProfileFromGithub (/mx-api-service/src/common/keybase/keybase.service.ts:159:21)\n at KeybaseService.getProfile (/mx-api-service/src/common/keybase/keybase.service.ts:149:27)\n at /mx-api-service/src/common/keybase/keybase.service.ts:137:25"],"timestamp":"2023-08-29T10:41:04.962Z"} {"body":null,"context":"GithubService:Keys against database / github invalidations","level":"error","message":"Request failed with status code 403","method":"GET","name":"AxiosError","response":{"documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting","message":"API rate limit exceeded for 52.74.11.111. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)"},"status":403,"timestamp":"2023-08-29T10:41:04.962Z","url":"https://api.github.com/users/ddigital","value":{"body":null,"message":"Request failed with status code 403","method":"GET","name":"AxiosError","response":{"documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting","message":"API rate limit exceeded for 52.74.11.111. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)"},"status":403,"url":"https://api.github.com/users/ddigital"}} {"body":null,"context":"ApiService","level":"error","message":"Request failed with status code 403","method":"GET","name":"AxiosError","response":{"documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting","message":"API rate limit exceeded for 52.74.11.111. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)"},"status":403,"timestamp":"2023-08-29T10:41:04.980Z","url":"https://api.github.com/users/art3mis","value":{"body":null,"message":"Request failed with status code 403","method":"GET","name":"AxiosError","response":{"documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting","message":"API rate limit exceeded for 52.74.11.111. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)"},"status":403,"url":"https://api.github.com/users/art3mis"}}

Why there are so many error, any insight for this? Is my config something wrong? Thanks in advance.

sylviahuang123 commented 1 year ago

I'm using my own node, why reach rate limit and need GitHub auth?

sylviahuang123 commented 1 year ago

another error log, but I try to curl this url response normal, is it somehow running too fast? Sep 04 02:43:49 ip-172-28-72-9 sudo[17247]: {"context":"Scheduler","level":"error","message":"Error when getting from gateway url http://127.0.0.1:8079/block/4294967295/by-nonce/3590361?withTxs=true: Error: Request failed with status code 500","stack":["Error: Error when getting from gateway url http://127.0.0.1:8079/block/4294967295/by-nonce/3590361?withTxs=true: Error: Request failed with status code 500\n at TransactionProcessor. (/mx-api-service/node_modules/@elrondnetwork/transaction-processor/lib/transaction.processor.js:368:23)\n at Generator.throw ()\n at rejected (/mx-api-service/node_modules/@elrondnetwork/transaction-processor/lib/transaction.processor.js:6:65)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)"],"timestamp":"2023-09-04T02:43:49.021Z","value":{}}

cfaur09 commented 1 year ago

Hi, for the GitHub rate limiting, in your config.yaml ( devnet, testnet, mainnet or custom) add your GitHub Token. First, you need to generate a GitHub token, than your add following in config: github: token: '<GITHUB_TOKEN>'