Using php + React/Ratchet to connect to the Depth websocket streams (any of them)
The same websocket code but for @trades work perfect, no disconnections at all.
When I subscribe to 340 symbols at 100ms (regardless if full updates, or level 5) the websocket never survives for more than a few minuntes.
I ran multiple Depth websockets independendly and they disconnect simultaneously (300ms difference) so it seems like something triggers that.
The error code is 1006 (abnormal disconnect), I tried to debug into the problem and all I could find was that the stream resource suddenly finishes.
I tried to minimize the code, so basically it’s an empty loop() that only responds lowlevel, same result.
I tried to subscribe to 1 symbol only, no disconnection happens.
When subscribing to the 340 symbols the disconnect happens from 150-180 seconds, when it happens it hits all Depth streams almost simultaneously.
I even tried to raw debug the incoming data, it just ends in the middle of a stream, no errors or anything.
I’m out of ideas by now.
I can ignore it and optimize my reconnect code but given that my trade stream with the same amount of symbols works flawless I have a hard time just giving up.