python - socket set blocking raising OSError: [Errno 11] Resource temporarily unavailable -
i creating socket , using communicate python processes.
i create socket way because have file descriptor:
sock = socket.fromfd(fd, socket.af_inet, socket.sock_stream)
if receive lot of requests raise [errno 11] resource temporarily unavailable.
when message not fit send buffer of socket, send() blocks, unless socket has been placed in nonblocking i/o mode. in nonblocking mode fail error eagain or ewouldblock in case. select(2) call may used determine when possible send more data.
then looks in nonblocking i/o mode , raising eagain error.
so set blocking:
sock.setblocking(1)
but keep having same error. socket.fromfd documentation says:
the socket assumed in blocking mode
firstly, have no idea "python process" is. process process. language written in, or interpreter may interpreting something, has nothing anything.
next, not sure "i create socket way because have file descriptor" means. don't see creating anything, but, rather, assigning value structure variable.
not knowing how instantiated socket, not possible guess resource issue might be.
Comments
Post a Comment