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

0

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?

已提問 1 年前檢視次數 489 次
3 個答案
0

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

已回答 1 年前
  • Removing the IP limit answer to avoid confusion for anyone looking at this in the future.

0

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:

https://api.binance.com
https://api1.binance.com
https://api2.binance.com
https://api3.binance.com
https://api4.binance.com

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."

AWS
專家
已回答 1 年前
0

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

已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南