Memory leak in my game

Hi everyone !

I have a problem with memory leak in my game.

The leak gradually increasing throughout hours of playing game, until it reached limit of memory.

It is multiplayer client-server game with Phaser 3 and node js .

I use mysql.createPool for mySQL to manage SQL connections. And after each connection i use “connection.release()”, so, I think trouble is not with SQL.
Even when nobody play game, leak of memory gradually increasing.
When many players have played many games, the leak accelerates even after everybody have left the game.

I delete instance of each scene (room) by this function :
game.destroy(true);

/// And then even do this :
game = null;

In the scene i mostly use local variables, so they must be deleted with destroying scene.

I also use many event listeners, for excample event when somebody connected to socket , and then as user interacting with game he generates some events.
But leak is increasing even when nobody connected to the game in current time, but somebody was playing game before.

Are anybody encountered with similar problem ? What solutions could it be ?

When I restart scene is it necessary to destroy all gameobjects manually before restart ? May be they stuck in memory ?

No, and game destroy would take care of that.

I think you have to use the browser dev tools to find the source.

So, i have done node inspect debug in chrome, and found the source, but don’t know how to fix it.
It is a lot of timeout events which leak the memory: https://i.gyazo.com/516af214656e3fd0a92d0149d30499f7.png
Inside it mostly everywhere “cancelAnimationFrame” event : https://i.gyazo.com/fe45a8448cde84921abe430508b575cc.png
I can’t understand how it possible, because i don’t use any animation on server, as it works in headless mode. May be users on client side somehow fire this event and send error to server ? This problem apears only when many players plays the game. When I try to reproduce same memory leak in test version of game when I play alone, there is no such timeout events and no leak of memory.
I try to solve this problem many days already … May be you can help me ? I can send snapshot if needed

So, after i reinstall all project in other directory leak of memory was disappeared .
It seems like it was some conflicts in packages and modules which i have installed