Open ilya2204 opened 11 months ago
hi @ilya2204, this shouldnt happen. I think you are seeing awareness updates, which are updated every 30 seconds per document. If you don't need awareness, you can disable it by passing awareness: null
to the provider, but make sure that you have at least one provider that uses it (or otherwise receives messages before HocuspocusProviderWebsocket.messageReconnectTimeout
Hello @janthurau, if this is awareness, it still doesn’t seem to make sense that when using multiplexing, each document sends its awareness once every 30 seconds? Is there a way to raise this timeout? With a large number of documents (several hundred), the socket sends messages continuously
I dont think you can raise that as this is yjs internals (see https://docs.yjs.dev/api/about-awareness), but you can just disable it if you don't need it for some (or all) documents.
Understood thanks. It's just that there are actually different parameters messageReconnectTimeout
, forceSyncInterval
, pingInterval
, outdatedTimeout
quite confusing.
I could be wrong, but at first glance, if you copy Awareness class and replace the timeout with the desired one, then everything should work.
@janthurau but it seems that doing ping/pong for each document on the socket, and not for the entire socket as a whole, is an overhead
@ilya2204 were you able to figure out a solution for this?
The problem I am facing When using multiplexing for connecting to a large number of documents via one socket the socket constantly spams with connection check messages (as I understand it is pingInterval) and this happens for each document separately.
The solution I would like Perhaps it can be done so that the connection is checked only for the main socket, and not for each document separately?