beanstalkc icon indicating copy to clipboard operation
beanstalkc copied to clipboard

recv() block process

Open FMLS opened this issue 7 years ago • 0 comments

hi, I use this lib in my project, in one process, I use a Connection to put message into a tube, after running several hours, I found that the process is blocked. I use strace -p to record the history, the last record are:

getpid()                                = 22953
sendto(17, "put 2147483648 0 120 353\r\n{\"user"..., 381, 0, NULL, 0) = 381
recvfrom(17,

obviously, the connection with beanstalkd blocked, and in beanstalkc.py, I found the code:

        self._socket.settimeout(None)
        self._socket_file = self._socket.makefile('rb')

the socket is block mode, I guess it is a possibility of blocking.

FMLS avatar Jan 05 '18 03:01 FMLS