I have a editor application made using yjs websocket server implementation.
The code is strictly used as is from the library and it works pretty well.
Until now I didn't had any monitoring tools in place to observe its behaviour but lately I have seen RAM piling up with memory and this is a bit surprising since the application gets around 300-500 traffic on a good day.
Is there anyway to properly debug this like some library to get heap snapshots or is this issue pre-existent cause I saw few threads before but they were fixed. Is something to be done to clear all the event listeners and handlers.
I also see some weird logs that I get in my pm2 service regarding service restarts when there are lot of connections. It seems yjs has some soft limit on no of event emitters/handlers need to know how this can be tackled!
some error logs eg:
[yjs] Tried to remove event handler that doesn't exist.
[yjs] Tried to remove event handler that doesn't exist.
[yjs] Tried to remove event handler that doesn't exist.
[yjs] Tried to remove event handler that doesn't exist.
[Function: Error] { stackTraceLimit: 10, prepareStackTrace: undefined }
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
[Function: Error] { stackTraceLimit: 10, prepareStackTrace: undefined }
[Function: Error] { stackTraceLimit: 10, prepareStackTrace: undefined }
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
[Function: Error] { stackTraceLimit: 10, prepareStackTrace: undefined }
[Function: Error] { stackTraceLimit: 10, prepareStackTrace: undefined }
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
[Function: Error] { stackTraceLimit: 10, prepareStackTrace: undefined }
[Function: Error] { stackTraceLimit: 10, prepareStackTrace: undefined }
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
[Function: Error] { stackTraceLimit: 10, prepareStackTrace: undefined }
[yjs] Tried to remove event handler that doesn't exist.
[yjs] Tried to remove event handler that doesn't exist.
[yjs] Tried to remove event handler that doesn't exist.
[yjs] Tried to remove event handler that doesn't exist.
I have a editor application made using yjs websocket server implementation. The code is strictly used as is from the library and it works pretty well. Until now I didn't had any monitoring tools in place to observe its behaviour but lately I have seen RAM piling up with memory and this is a bit surprising since the application gets around 300-500 traffic on a good day. Is there anyway to properly debug this like some library to get heap snapshots or is this issue pre-existent cause I saw few threads before but they were fixed. Is something to be done to clear all the event listeners and handlers.
I also see some weird logs that I get in my pm2 service regarding service restarts when there are lot of connections. It seems yjs has some soft limit on no of event emitters/handlers need to know how this can be tackled!
some error logs eg:
Attached a ss of the mem leak...