(503) Server Unavailable. This distribution exceeded the limit on requests per second.


I am developing a trading bot for the Binance exchange, using their API I am making an average of 50 http web requests per second with spikes up to maximum 200 requests per second. My application is developed in .net and does intensive use of multithreading. After a couple of hours that my bot is running, about 2% of my requests start hitting the following error:

Exception: The remote server returned an error: (503) Server Unavailable.

Details: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <TITLE>ERROR: The request could not be satisfied</TITLE> </HEAD><BODY> <H1>503 ERROR</H1> <H2>The request could not be satisfied.</H2> <HR noshade size="1px"> This distribution exceeded the limit on requests per second. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner. <BR clear="all"> If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation. <BR clear="all"> <HR noshade size="1px"> <PRE> Generated by cloudfront (CloudFront) Request ID: deswmI9Dh93g-OXhmg0xAXqCT-MRCThr-XbDBBUvtunoo5dqiBbd7g== </PRE> <ADDRESS> </ADDRESS> </BODY></HTML>

My application backing off for a minute or five or whatever amount of time does not solve the issue, as soon as it starts submitting requests to Binance again the error represents itself. The only way to temporary solve this problem is to restart my application, but as I said it works only for a couple of hours. What could the problem be?

asked 6 days ago44 views
3 Answers

I am always well below the Binance IP limit and when I surpass it I receive a different type of error. Also, I am not restarting the EC2 instance and I am not getting a new IP, just restarting my bot application gets rid of the issue, that's weird I've been trying to troubleshoot this for weeks. Issue is very similar to this one. https://stackoverflow.com/questions/75153460/how-do-i-fix-this-invalid-json-error-message-from-binance

answered 6 days ago
  • Removing the IP limit answer to avoid confusion for anyone looking at this in the future.


This is not something you can control on your side. As the error message says you need to reach out to the app owner in this case Binance so they can address the issue of exceeding requests per second on their distribution or direct you to another endpoint. an except from "https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md" appears to show they have multiple endpoints that each have their own infrastructure behind them, so if one endpoints generates the error, you may be able to try another endpoint. Perhaps the behavior you are seeing is from a fresh dns resolution that resolves to a different distribution that isn't experiencing congestion, but that is just speculation. "The following base endpoints are available:


All endpoints are equal in functionality. Performance may vary between the base endpoints and can be freely switched between them to find which one works best for one's setup."

answered 6 days ago

The issue I am having is related to the only futures trading endpoint they provide https://fapi.binance.com.

The thing that seems very weird to me is that I can get rid of the issue simply by closing and re opening my application, that is why I believe the problem is on my side.

It would be very useful to know a little bit more about this type of error, what does it mean and when does it trigger. I could find very little information online

answered 6 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions