-
Notifications
You must be signed in to change notification settings - Fork 13
Cannot receive on channel after restarting. Bug? #14
Comments
This is not by design, so it's probably a bug - while technically channel layers are allowed to drop messages, dropping 70 left in the queue is a bit much. I would recommend using the Redis channel layer if you want something more reliable, it's much more proven. |
I have only a small project on one machine. Redis would be an overhead I'd like to avoid. But thanks for the hint, though! Oh, and I was not dropping 70 messages. I edited/condensed the code to make it more obvious what is happening. I also get an exception at the end. Not sure why, though. When I debug the code line per line I don't get one. Maybe an issue with execution speed or something? |
The issue is caused by Line 296 in f1d205c
Not exactly sure how this works here because within a single process we have two Now this happens, minus the part where it says "after the last shm_unlink()":
The quick fix is to simply not call Initially I had the issue with |
Urgh, yes, that seems to be what this is; it behaves differently if it's two inside one process versus two in different processes. I'm still very much tempted to try out a sqlite-based backend as a replacement for this shared memory stuff, given that the performance testing we did showed this was surprisingly slow. |
I have an issue and I am not sure if that is by design. When my program restarts it does not receive any more messages on a channel.
I prepared an example which you find further down.. At the 30th iteration I am simulating the restart of the program by simply doing this:
After that the script keeps printing
(None, None)
although it is still sending on the other channel layer.Is that by design or a bug?
Example
Output
The text was updated successfully, but these errors were encountered: