[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gluster-devel] Glupy connection closing
From: |
Jeff Darcy |
Subject: |
Re: [Gluster-devel] Glupy connection closing |
Date: |
Mon, 29 Apr 2013 18:00:29 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 |
On 04/29/2013 12:23 PM, Justin Clift wrote:
> Tried establishing a tcp connection during the translator _init_, then
> re-using it for every fop invocation. The very first time invovation
> works, which likely executes the init code too. Everything after that
> though gives "broken pipe" errors:
>
> ERROR: Error received at msg.sendall() time: [Errno 32] Broken pipe
>
> Code here, if it's helpful:
>
>
> https://github.com/justinclift/glupy/blob/glusterflow_sharing/glusterflowclient.py
>
> On IRC, Kaleb mentioned it just might be how this works. i.e. Python
> closing all connections at the end of each invocation
That doesn't quite make sense to me. AIUI, the C part of the code
should still have a borrowed reference to the Translator object from
PyObject_CallObject, so it shouldn't be deleted. If not, that's easy to
fix. However, even if that were the case, __init__ would be called on
the new object and things would still work (albeit inefficiently). Have
you verified that __init__ is in fact being called multiple times? If
not, then it's a different kind of problem that we'll need to figure out.