[ome-users] BlitzGateway: keep connection alive to write large ROIs

William Moore (Staff) W.Moore at dundee.ac.uk
Wed Apr 26 11:16:00 BST 2017


Hi Paul,

 You can enable the keepAlive on the client object with
conn.c.enableKeepAlive(300)
See 5.2 docs: https://downloads.openmicroscopy.org/omero/5.2.0/api/omero/client.html#enableKeepAlive-int-

Also you can set this in the etc/omero.properties file.
See discussion at https://www.openmicroscopy.org/community/viewtopic.php?f=6&t=495

Hope that helps,

  Will.



On 24 Apr 2017, at 09:44, Paul Korir <pkorir at ebi.ac.uk<mailto:pkorir at ebi.ac.uk>> wrote:

Dear OMERO Users/Developers,

I'm writing a client application which connects to an OMERO server through a BlitzGateway object but I get a lost-connection exception. Could someone please advise me on how to keep a connection open? The snippet of code is roughly the following:

conn = omero.gateway.BlitzGateway(...)
roi = <some large ROI object>
conn.getUpdateService().saveObject(roi)

Please see the traceback below:

Traceback (most recent call last):
 File "/Users/pkorir/omero/OMERO.server/lib/python/omero/gateway/__init__.py", line 4212, in __call__
   return self.f(*args, **kwargs)
 File "/Users/pkorir/omero/OMERO.server/lib/python/omero_api_IUpdate_ice.py", line 131, in saveAndReturnObject
   return _M_omero.api.IUpdate._op_saveAndReturnObject.invoke(self, ((obj, ), _ctx))
ConnectionLostException: Ice.ConnectionLostException:
Broken pipe
Fri Apr 21 17:02:55 2017    Closing the connection...
Fri Apr 21 17:02:55 2017    Deleting ROIHandler instance... OK
WARNING:omero.client:Cannot get session service for killSession. Using closeSession
Fri Apr 21 17:02:55 2017    Connection closed.
Traceback (most recent call last):
 File "/Users/pkorir/VirtualEnvs/sfftk/bin/sffp", line 11, in <module>
   load_entry_point('sfftk-plus', 'console_scripts', 'sffp')()
 File "/Users/pkorir/Documents/workspace/bioimaging-scripts/trunk/sfftk-plus/sfftkplus/sffplus.py", line 460, in main
   return handle_attachroi(args)
 File "/Users/pkorir/Documents/workspace/bioimaging-scripts/trunk/sfftk-plus/sfftkplus/sffplus.py", line 381, in handle_attachroi
   omero_connection.saveRoi(roi)
 File "/Users/pkorir/Documents/workspace/bioimaging-scripts/trunk/sfftk-plus/sfftkplus/omero/handlers.py", line 149, in saveRoi
   self.conn.getUpdateService().saveAndReturnObject(roi)
 File "/Users/pkorir/omero/OMERO.server/lib/python/omero/gateway/__init__.py", line 4215, in __call__
   return self.handle_exception(e, *args, **kwargs)
 File "/Users/pkorir/omero/OMERO.server/lib/python/omero/gateway/__init__.py", line 4212, in __call__
   return self.f(*args, **kwargs)
 File "/Users/pkorir/omero/OMERO.server/lib/python/omero_api_IUpdate_ice.py", line 131, in saveAndReturnObject
   return _M_omero.api.IUpdate._op_saveAndReturnObject.invoke(self, ((obj, ), _ctx))
Ice.ConnectionLostException: Ice.ConnectionLostException:
Broken pipe

--
Paul K. Korir, PhD
Scientific Programmer
EMBL-EBI
01223494422

_______________________________________________
ome-users mailing list
ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users


The University of Dundee is a registered Scottish Charity, No: SC015096
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20170426/a32f19e0/attachment.html>


More information about the ome-users mailing list