channels icon indicating copy to clipboard operation
channels copied to clipboard

Possible memory leak when sending large messages via web sockets

Open devxplorer opened this issue 5 years ago • 6 comments

This issue is the continuation of #1181.

Current leak can be easily reproduced by following steps in readme of test project. Please note that the branch is different - big_payload.

The result of the steps will be a graph on which you can clearly see that the memory starts to grow in spurts and is not released completely (example graph).

The test environment is the same as in the previous issue.

devxplorer avatar Dec 20 '18 15:12 devxplorer

OK - note that it may be a few months before I can get to this, so if anyone else wants to take a look they're welcome.

@devxplorer Have you confirmed this problem is in Channels rather than the Redis layer?

andrewgodwin avatar Dec 20 '18 15:12 andrewgodwin

@andrewgodwin

@devxplorer Have you confirmed this problem is in Channels rather than the Redis layer?

I can not say for sure, could you please tell how can I find it out?

devxplorer avatar Dec 20 '18 16:12 devxplorer

Strange thing, I tried to run a test script on another computer, there was no memory leak on the resulting graph. I will try to find out under what conditions it occurs.

devxplorer avatar Dec 21 '18 07:12 devxplorer

You can turn off the Redis channel layer (set CHANNEL_LAYERS to empty), make sure none of your code uses it, and test again.

andrewgodwin avatar Dec 21 '18 09:12 andrewgodwin

@devxplorer you sure you updated all your channels packages?

agronick avatar Jan 01 '19 18:01 agronick

@devxplorer you sure you updated all your channels packages?

Maybe not. But now I can not repeat the result which is on the graph neither with the old versions of libraries, nor with the new ones.

devxplorer avatar Jan 06 '19 00:01 devxplorer

I'm going to close this. If something is still reproducible here please open a fresh issue.

carltongibson avatar Apr 30 '23 08:04 carltongibson