Closed jstray closed 7 years ago
The IPC layer requires both free memory and a compatible underlying UNIX system, so it's possible that either you have memory exhaustion or your version of Mac OS isn't quite compatible with how we're allocating it. Either way, I suggest you switch to the Redis backend.
If OS X is listed as a supported platform, could we perhaps actually solve this issue? I'm experiencing the same on OS X 10.11.6 and found that instantiating SharedMemory
with the O_CREAT
flag does not, in fact, only try to create a segment if it doesn't exist yet. The second time it fails with either the given ValueError
or a posix_ipc.PermissionsError
. This might be a bug in posix_ipc
, but it seems possible to work around it by changing:
self.memory = posix_ipc.SharedMemory(path, flags=posix_ipc.O_CREAT, size=self.memory_size)
into:
try:
self.memory = posix_ipc.SharedMemory(path, flags=posix_ipc.O_CREX, size=self.memory_size)
except posix_ipc.ExistentialError:
self.memory = posix_ipc.SharedMemory(path)
I then get an Edit: already fixed._pickle.UnpicklingError: invalid load key, '\x00'
. I'm not sure why that (assumably) isn't an issue on Linux, but it's a matter of initialization that should be easy to fix.
I get this every single time I try to start a server with
daphne cjworkbench.asgi:channel_layer
:And then several other exceptions while handling that one. This is on Mac OS. Maybe is mmap not supported on this OS?
My settings: