Due to the recent mainnet.infura.io outages, I decided to switch some code which was using infura to the myetherwallet JSON RPC interface. During this time, the following error occasionally occurred.

Error: Invalid JSON RPC response: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<HTML><HEAD><META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n<TITLE>ERROR: The request could not be satisfied</TITLE>\n</HEAD><BODY>\n<H1>ERROR</H1>\n<H2>The request could not be satisfied.</H2>\n<HR noshade size=\"1px\">\nThe origin closed the connection.\n<BR clear=\"all\">\n<HR noshade size=\"1px\">\n<PRE>\nGenerated by cloudfront (CloudFront)\nRequest ID: GQeM8ZIaLpwEBaAjAgi5g3i2D2cnKfkdvJn6vBguj-UmSoT7GSxG-g==\n</PRE>\n<ADDRESS>\n</ADDRESS>\n</BODY></HTML>"
    at Object.InvalidResponse (/home/drone/projects/mew/asset-position-disposal/node_modules/web3/lib/web3/errors.js:38:16)
    at XMLHttpRequest.request.onreadystatechange (/home/drone/projects/mew/asset-position-disposal/node_modules/web3/lib/web3/httpprovider.js:115:32)
    at XMLHttpRequestEventTarget.dispatchEvent (/home/drone/projects/mew/asset-position-disposal/node_modules/xhr2/lib/xhr2.js:64:18)
    at XMLHttpRequest._setReadyState (/home/drone/projects/mew/asset-position-disposal/node_modules/xhr2/lib/xhr2.js:354:12)
    at XMLHttpRequest._onHttpResponseEnd (/home/drone/projects/mew/asset-position-disposal/node_modules/xhr2/lib/xhr2.js:509:12)
    at IncomingMessage.<anonymous> (/home/drone/projects/mew/asset-position-disposal/node_modules/xhr2/lib/xhr2.js:469:24)
    at emitNone (events.js:110:20)    
    at IncomingMessage.emit (events.js:207:7)                                
    at endReadableNT (_stream_readable.js:1047:12)                           
    at _combinedTickCallback (internal/process/next_tick.js:102:11)

What is this? Does myetherwallet implement ratelimiting?


MyEtherWallet, at the time of this writing, rate-limits at 400 requests / minute (or about 6 requests / second). This is in order to prevent DDOS's like we have seen before, or people using our nodes to excess and making us pay an even larger bill. Our goal is to allow individuals to interact with Ethereum, not provide uber-robust infrastructure for all your heart's desires. This should be more than enough for a single person's use, but feel free to tell me why you need more and we can adjust.

If you are going to be using it more than 400 req / minute on average, or just want to ensure uptime, we strongly recommend you get your own node.

Our backend infrastructure is on AWS and is open-source via Docker + CloudFormation walkthrough thingy and you can actually do it yourself and run your own public or private node via these instructions: https://github.com/MyEtherWallet/docker-geth-lb

Or you could pay a small fee and use QuikNode which makes it even easier.

For both of these options you could connect to your new node via the "Add Custom Node" option in the network selector in the top-right corner. Further details on how to connect to your own node can be found here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.