[Gluster-devel] Glupy connection closing
Justin Clift
jclift at redhat.com
Mon Apr 29 16:23:07 UTC 2013
Hi Jeff,
Do you reckon sharing a tcp connection between calls to a Glupy
translator should work?
Asking because over the weekend, was trying out something interesting
with Glupy.
Created a super simple json client, that on every fop in Gluster sends
a json message to a central collector with the details (ie filename,
which operation, which protocol, and a timestamp). Using Glupy for
the client side.
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
Any idea if there might be a workaround?
(Have resorted to using a new connection with every fop, but that's
non-optimal. Fills conn table pretty quickly. Might need to use
udp instead.).
Regards and best wishes,
Justin Clift
--
Open Source and Standards @ Red Hat
twitter.com/realjustinclift
More information about the Gluster-devel
mailing list