Greg, Thanks for the comments. I'll do some tests along the lines of what you suggest.
FWIW, I'm using Riak 1.0.3. Jim On 2/27/12 7:46 PM, "Greg Stein" <gst...@gmail.com> wrote: >] >X-pstn-settings: 3 (1.0000:0.1000) s cv GT3 gt2 gt1 r p m c >X-pstn-addresses: from <gst...@gmail.com> [db-null] > >To clarify my thread-sharing comments: those are with respect to the >unreleased client. And I've checked: the Bucket objects are sharable, >too. Obviously, not if multiple threads are calling competing .set_r() >or somesuch on the client or bucket. The short answer is share Client >and Bucket objects to get access to Objects, and keep those >per-thread. > >The underlying transport will manage multiple connections, >persistently, in a thread-safe manner. > >(and I'm unclear on threading issues for the 1.3.0 python client) > >Cheers, >-g > >On Mon, Feb 27, 2012 at 22:37, Greg Stein <gst...@gmail.com> wrote: >> IIRC, that error was seen when connecting to Riak 0.14.0. What version >>of >> Riak are you connecting to? >> >> I might also suggest using the current, unreleased Python client from >>the >> master branch on GitHub. It has much better support for threads and >> persistent connections. Just don't use variant client_id values and PB >> connections (switch to Riak 1.1 and ignore client_id). >> >> One Client can be shared across threads, but not Objects. I don't recall >> whether Buckets can be shared. >> >> Cheers, >> -g >> >> On Feb 26, 2012 2:39 PM, "Jim Adler" <jad...@intelius.com> wrote: >>> >>> I'm getting the following error while using protocol buffers >>> (RiakPbcTransport) with more than one thread (stack trace below): >>> >>> Socket returned short packet length 0 - expected 4' >>> >>> I'm using the 1.3.0 Python client on Mac and Ubuntu 11.04 and have seen >>> the same error on both OS's. A single-thread works fine as does the >>> RiakHttpTransport. >>> >>> Anyone have this problem? >>> >>> Thanks, >>> Jim >>> >>> File >>> >>> >>>"/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7 >>>/li >>> b/python2.7/site-packages/riak-1.3.0-py2.7.egg/riak/bucket.py", line >>>260, >>> in get >>> return obj.reload(r) >>> File >>> >>> >>>"/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7 >>>/li >>> b/python2.7/site-packages/riak-1.3.0-py2.7.egg/riak/riak_object.py", >>>line >>> 373, in reload >>> Result = t.get(self, r, vtag) >>> File >>> >>> >>>"/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7 >>>/li >>> b/python2.7/site-packages/riak-1.3.0-py2.7.egg/riak/transports/pbc.py", >>> line 195, in get >>> msg_code, resp = self.send_msg(MSG_CODE_GET_REQ, req, None) >>> File >>> >>> >>>"/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7 >>>/li >>> b/python2.7/site-packages/riak-1.3.0-py2.7.egg/riak/transports/pbc.py", >>> line 387, in send_msg >>> return self.recv_msg(conn, expect) >>> File >>> >>> >>>"/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7 >>>/li >>> b/python2.7/site-packages/riak-1.3.0-py2.7.egg/riak/transports/pbc.py", >>> line 413, in recv_msg >>> self.recv_pkt(conn) >>> File >>> >>> >>>"/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7 >>>/li >>> b/python2.7/site-packages/riak-1.3.0-py2.7.egg/riak/transports/pbc.py", >>> line 460, in recv_pkt >>> len(nmsglen)) >>> RiakError: 'Socket returned short packet length 0 - expected 4' >>> >>> >>> _______________________________________________ >>> riak-users mailing list >>> riak-users@lists.basho.com >>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com _______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com