Get "internal service failure"


I use nodejs and web3js on my project.
But my program gets “internal service failure” error.
I’m a core plan user. And my program requests under 10000/day.
Why it gets the error? What the “internal service failure” error is?

hi @pierogi can you please give us some details about this error: what is the relevant code part throwing the error, what is the full stack trace ?


Thank you for your reply.

My code is simple getting block information.
For example, make web3 instance like below,

const web3 = new Web3(new Web3.providers.HttpProvider(process.env.api_url_and_key));

And use it like below,

let block_info = await web3.eth.getBlock(number);
let uncle_block_info = await web3.eth.getUncle(number, index);

My code runs only two methods(getBlock, getUncle) several hundred times hourly for gathering hourly block information like hourly hash rate.

But my code gets the error below.

Error: Invalid JSON RPC response: "internal service failure\n"
    at Object.InvalidResponse (/home/ubuntu/*********/node_modules/web3-core-helpers/lib/errors.js:43:16)
    at XMLHttpRequest.request.onreadystatechange (/home/ubuntu/*********/node_modules/web3-providers-http/lib/index.js:95:32)
    at XMLHttpRequestEventTarget.dispatchEvent (/home/ubuntu/*********/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22)
    at XMLHttpRequest._setReadyState (/home/ubuntu/*********/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14)
    at XMLHttpRequest._onHttpResponseEnd (/home/ubuntu/*********/node_modules/xhr2-cookies/dist/xml-http-request.js:318:14)
    at IncomingMessage.<anonymous> (/home/ubuntu/*********/node_modules/xhr2-cookies/dist/xml-http-request.js:289:61)
    at IncomingMessage.emit (events.js:388:22)
    at endReadableNT (internal/streams/readable.js:1336:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)

Although the above error does not occur always, the occurrence is sometimes, but I want to make the code always run without any error occurs.

Is there anything you can advise me to do with the above error code?

Please forgive me if this is a trivial mistake.


Thanks for this data ! Can you try with WebsocketProvider and see if it goes away ?
Also, please send us an email to and mention the projectID and network you’re using and we’ll closely look at it.