channels
channels copied to clipboard
Possible memory leak when sending large messages via web sockets
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.
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
@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?
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.
You can turn off the Redis channel layer (set CHANNEL_LAYERS
to empty), make sure none of your code uses it, and test again.
@devxplorer you sure you updated all your channels packages?
@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.
I'm going to close this. If something is still reproducible here please open a fresh issue.