Closed tuloski closed 5 years ago
Hello Tuloski,
I reproduced the issue using your script. The connections you are opening to the server are non-admin privileged and therefore are rate limited. This is a server mechanism meant to protect against client connections demanding too much in a short period of time.
A few running instances of your script consume enough drop
fees fast enough to cross a server threshold that will cause the IP to be disconnected. When this happens, all WebSocket connections from that IP will be disconnected and new connections will not be allowed from the same IP for a period of time. If you set your log severity to info
, you will see the warnings and disconnects documented in the log file. The rate limitation does not apply to admin connections.
I also noticed that your script (possibly ripple API?) attempts to reconnect immediately after being disconnected. This aggravates the problem as it will extend the waiting period necessary to connect again.
You have two choices, either use admin connections or slow the number of requests per WebSocket.
-M
See screenshot for attached script output. Note updated return code (1008 for "Policy Violation")
Hello Tuloski,
I reproduced the issue using your script. The connections you are opening to the server are non-admin privileged and therefore are rate limited. This is a server mechanism meant to protect against client connections demanding too much in a short period of time.
A few running instances of your script consume enough
drop
fees fast enough to cross a server threshold that will cause the IP to be disconnected. When this happens, all WebSocket connections from that IP will be disconnected and new connections will not be allowed from the same IP for a period of time. If you set your log severity toinfo
, you will see the warnings and disconnects documented in the log file. The rate limitation does not apply to admin connections.I also noticed that your script (possibly ripple API?) attempts to reconnect immediately after being disconnected. This aggravates the problem as it will extend the waiting period necessary to connect again.
You have two choices, either use admin connections or slow the number of requests per WebSocket.
-M
How to use admin connections? please
Connect on an admin-only port.
The server will also send you specific warnings to slow down. Backing off a second each time you get that warning should help. Look for RPC error code slowDown
and JSON response entry "warning" : "load"
.
I have a rippled with the following modif on the rippled.cfg:
[server] port_ws_public
[port_ws_public] port = 8888 ip = 0.0.0.0 protocol = ws
I have multiple peers (locally) that connect to that ws.
If one host requests lots of data via the ws (for example lots of books), the ws closes with code 1000, but:
The following code (with RippleAPI) can be used to trigger the error: