-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebSocket: Could not connect: HTTP/1.1 504 Gateway Time-out #150
Comments
This is an issue on the binance side I believe, unless you actually are abusing the api and sending too many requests and get a 418/429 error Perhaps there is a better way to handle this type of event but I can't think of one off the top of my head |
Is there any update on this? |
Hello, I'm still getting errors. I'm running the script with supervisorctl, so it restarts each time that crash. I'm pretty sure I'm not abusing the API because the error is 500, not 429/418. Maybe it's some kind of overload on Binance. Sometimes the script run for more than 4 days, which is strange because I thought that Binance shuts down the connection each 24h. Thanks. |
Hello, I have some more info today. As I said I put the script under supervisor so it would be relaunched whenever it dies. Today we noticed that the prices weren't being updated, so checking the logs I saw that since 7 hours ago, the response from Binance stopped being "504 Gateway Time-out" to "403 Forbidden" and has been in that way since then:
|
It becomes forbidden after making too many requests https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md most of the heavy lifting can be done by websockets, which are free to use todo: implement accountInfo function which confirms you are IP banned |
Not sure if it's related, but Binance did perform a system upgrade and had an extended downtime yesterday (~6hrs). Could this account for your errors? https://support.binance.com/hc/en-us/sections/115000202591-Latest-News |
Nope, it wasn't. Once the maintenance starter I just stopped receiving any data, no error either. The error that I reported was several hours before. |
no update in 14 days, please re-open the ticket if you have further information. |
Hello,
I'm not sure if this is a bug, or I'm abusing the API (however I don't get any 429 or 418 HTTP codes), but I'm getting a lot of 504 Gateway Time-out when trying to pull data through WebSocket.
My code is like this:
getSymbols() get the entire list of symbols from Binance (315 pairs) and convert them to an array.
I have been running this script for an entire day in local, then I moved it to a server and I started to get this errors. I thought it could be because I was using the same Binance key/secret in both environments at the same time, so I asked for another key/secrets from a different Binance account. It's weird because since I have done this I haven't been able to run the script in the remote server, and I have had to try for more than 1 hour to make it run in local.
Are 315 symbols too much to ask? If not, would it be possible to check the disconnections (or failure to connect) and try again? It looks like it's a matter of trying, because the error sometimes talks about one pair, then about a different one:
My PHP version is: PHP 7.0.27-0+deb9u1 (cli), running in Debian 9.4 kernel: 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3+deb9u1
Thanks in advance.
The text was updated successfully, but these errors were encountered: