[ome-devel] Python SessionTimeoutException

Niko Ehrenfeuchter nikolaus.ehrenfeuchter at unibas.ch
Fri Mar 4 14:54:00 GMT 2016


Dear all,

we're constantly experiencing session timeouts in one of our Python 
scripts (see the traceback below). I was very surprised to see the TTL 
is reported as 60000 ms in the error trace, so I went and checked if 
something is wrong with "omero.sessions.timeout". As this setting had 
not been configured explicitly before, I did so by running

> bin/omero config set omero.sessions.timeout 600000
> bin/omero admin restart

but the timeout persists. So apparently this is not about 
"omero.sessions.timeout"...?

Am I doing something wrong? Please note that this is on 5.1.2!

Cheers
Niko

> Traceback (most recent call last):
>   File "/home/omeronas/misc/test.py", line 518, in <module>
>     sys.exit(main())
>   File "/home/omeronas/misc/test.py", line 514, in main
>     generate_tree(user)
>   File "/home/omeronas/misc/test.py", line 435, in get_orignames
>     for image in dset.listChildren():
>   File "/home/omeronas/OMERO.server/lib/python/omero/gateway/__init__.py", line 687, in listChildren
>     for child in self._listChildren(ns=ns, val=val, params=params):
>   File "/home/omeronas/OMERO.server/lib/python/omero/gateway/__init__.py", line 676, in _listChildren
>     ).findAllByQuery(query, params, self._conn.SERVICE_OPTS)):
>   File "/home/omeronas/OMERO.server/lib/python/omero/gateway/__init__.py", line 4126, in __call__
>     return self.handle_exception(e, *args, **kwargs)
>   File "/home/omeronas/OMERO.server/lib/python/omero/gateway/__init__.py", line 4123, in __call__
>     return self.f(*args, **kwargs)
>   File "/home/omeronas/OMERO.server/lib/python/omero_api_IQuery_ice.py", line 213, in findAllByQuery
>     return _M_omero.api.IQuery._op_findAllByQuery.invoke(self, ((query, params), _ctx))
> omero.SessionTimeoutException: exception ::omero::SessionTimeoutException
> {
>     serverStackTrace = ome.conditions.SessionTimeoutException: Session (started=2016-03-04 15:24:57.51, hits=1888, last access=2016-03-04 15:25:05.955) exceeded timeToLive (60000) by 653 ms
>         at ome.services.sessions.state.SessionCache.getDataNullOrThrowOnTimeout(SessionCache.java:465)
>         at ome.services.sessions.state.SessionCache.getSessionContext(SessionCache.java:371)
>         at ome.services.sessions.state.SessionCache.getSessionContext(SessionCache.java:356)
>         at ome.services.sessions.SessionManagerImpl.getUserRoles(SessionManagerImpl.java:652)
>         at ome.security.basic.BasicMethodSecurity.checkMethod(BasicMethodSecurity.java:112)
>         at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:81)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>         at ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:43)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
>         at $Proxy80.findAllByQuery(Unknown Source)
>         at sun.reflect.GeneratedMethodAccessor675.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at ome.services.blitz.util.IceMethodInvoker.invoke(IceMethodInvoker.java:179)
>         at ome.services.throttling.Callback.run(Callback.java:56)
>         at ome.services.throttling.InThreadThrottlingStrategy.callInvokerOnRawArgs(InThreadThrottlingStrategy.java:56)
>         at ome.services.blitz.impl.AbstractAmdServant.callInvokerOnRawArgs(AbstractAmdServant.java:149)
>         at ome.services.blitz.impl.QueryI.findAllByQuery_async(QueryI.java:66)
>         at sun.reflect.GeneratedMethodAccessor674.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>         at omero.cmd.CallContext.invoke(CallContext.java:78)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
>         at $Proxy81.findAllByQuery_async(Unknown Source)
>         at omero.api._IQueryTie.findAllByQuery_async(_IQueryTie.java:90)
>         at omero.api._IQueryDisp.___findAllByQuery(_IQueryDisp.java:341)
>         at omero.api._IQueryDisp.__dispatch(_IQueryDisp.java:464)
>         at IceInternal.Incoming.invoke(Incoming.java:222)
>         at Ice.ConnectionI.invokeAll(ConnectionI.java:2482)
>         at Ice.ConnectionI.dispatch(ConnectionI.java:1258)
>         at Ice.ConnectionI.message(ConnectionI.java:1213)
>         at IceInternal.ThreadPool.run(ThreadPool.java:321)
>         at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
>         at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:693)
>         at java.lang.Thread.run(Thread.java:722)
>
>     serverExceptionClass = ome.conditions.SessionTimeoutException
>     message = Session (started=2016-03-04 15:24:57.51, hits=1888, last access=2016-03-04 15:25:05.955) exceeded timeToLive (60000) by 653 ms
> }


More information about the ome-devel mailing list