Closed vmonteco closed 8 years ago
As the exception ways, it's failing to allocate the shared memory segment, probably due to RAM pressure (are you close to using all of your memory?) - there's not much the code can do if mmap fails, it means the system rejected us for some reason.
If you're very short on memory, you can try changing the channel_memory
and group_memory
config values down below the defaults of 100MB and 20MB - see the readme for more info on that.
I get this every single time I try daphne cjworkbench.asgi:channel_layer
Traceback (most recent call last):
File "/Users/jonathanstray/anaconda/lib/python3.5/site-packages/asgi_ipc.py", line 208, in __init__
size=self.size,
ValueError: The size is invalid or the memory is read-only
And then several other exceptions while handling that one. This is on Mac OS. Maybe is mmap not supported on this OS?
My settings:
CHANNEL_LAYERS = {
"default": {
"BACKEND": "asgi_ipc.IPCChannelLayer",
"ROUTING": "cjworkbench.routing.channel_routing",
"CONFIG": {
"prefix": "cjworkbench",
},
},
}
Above comment addressed in #19.
Hello!
I'm trying to use
asgi_ipc
as channel backends but if sometimes it works :But sometimes (3 times out of 4) it crashes :
I used the following
CHANNEL_LAYERS
value :And installed
asgi_ipc
from sources, the last commit being :https://github.com/django/asgi_ipc/commit/f22c60a677dd2cabb85d965c606dc036e0fddd7f
I've seen the issue #4 but I don't know it it is related. Anyway the PR used to solve this one doesn't prevent this problem for me.
I have no problem if I use an other channel backend (tested with
asgi_redis
).