Skip to content

Commit

Permalink
omero.gateway.BlitzGateway.__del__ hangs server
Browse files Browse the repository at this point in the history
*Problem*: having any blocking actions in a __del__ method
can lead to hung gunicorn processes in OMERO.web. The addition
of the method was intended to detect dangling services, but
each call left further resources, detectable with `lsof`.

*Short-term fix*: By removing the method, OMERO.web should
no longer need to be periodically restarted.

*Long-term fix*: as a next step, the `_assert_unregistered`
method will need to again be invoked, perhaps by integration
tests, to detect the resources that were being left open.
Eventually, a rewrite of the `login_requred` decorator as
well as the `close` logic of BlitzGateway should be considered
so that resource cleanup can be guaranteed.
  • Loading branch information
joshmoore committed Jan 26, 2018
1 parent bde5b6b commit fe9eda4
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions components/tools/OmeroPy/src/omero/gateway/__init__.py
Expand Up @@ -1921,10 +1921,6 @@ def close(self): # pragma: no cover
self._proxies = NoProxies()
logger.info("closed connecion (uuid=%s)" % str(self._sessionUuid))

def __del__(self):
logger.debug("##GARBAGE COLLECTOR KICK IN")
self._assert_unregistered()

def _createProxies(self):
"""
Creates proxies to the server services. Called on connection or
Expand Down

0 comments on commit fe9eda4

Please sign in to comment.