Re: [MonetDB-users] MonetDB Python client
Dear Fabian! The problem appears with "classical" mapi2.py when server drops the connection without closing it correctly. This happens with some incorrect SQLs (sometimes error diagnostics simply fails). recv(bytes) hangs in this case. I have faced this problem before with sockets, and the only solution I know so far is select() method. I raise socket.error only in the case of such hard connection failure. So it does not seem too harsh. At least it is better than thread-blocking. Regards, Alexey Mints
On 10-07-2012 15:51:13 +0200, Alexey Mints wrote:
Dear Fabian! The problem appears with "classical" mapi2.py when server drops the connection without closing it correctly. This happens with some incorrect SQLs (sometimes error diagnostics simply fails). recv(bytes) hangs in this case. I have faced this problem before with sockets, and the only solution I know so far is select() method. I raise socket.error only in the case of such hard connection failure. So it does not seem too harsh. At least it is better than thread-blocking.
This commit[1] should fix the hang that you observe. If the problem you have persists somehow, let us know. Fabian [1] http://dev.monetdb.org/hg/MonetDB/rev/2e0d2ee4a592
participants (2)
-
Alexey Mints
-
Fabian Groffen