I have an python application that uses a dictionary as a shared memory between multiple processes:
from multiprocessing import Manager
manager = Manager()
shared_dict = manager.dict()
REST API is implemented using Flask. While using pywsgi or simply Flask.run to initialise the Flask server everything was working fine. I decided to throw in the mix gunicorn. Now, when I access this shared dict from any of the workers (even when only one is running) I get the error:
message = connection.recv_bytes(256) # reject large message
IOError: [Errno 35] Resource temporarily unavailable
I have been looking into mmap, multiprocessing Listener and Client and they all looked like a lot of overhead.