[ome-devel] Python SessionTimeoutException

Niko Ehrenfeuchter nikolaus.ehrenfeuchter at unibas.ch
Wed Mar 9 11:12:32 GMT 2016


Hi Josh,

apologies for the delay, been busy with running a workshop on the last 
two days...

On 07.03.2016 12:05, Josh Moore wrote:
> Hi Niko,
>
> On Fri, Mar 4, 2016 at 3:57 PM, Niko Ehrenfeuchter
> <nikolaus.ehrenfeuchter at unibas.ch> wrote:
>> Probably I should mention that I've read the forum post from 2010 about
>> "Connection and Session timeouts" [1], but unfortunately this did not make
>> me any smarter :-/
>>
>> ~Niko
>>
>> [1] https://www.openmicroscopy.org/community/viewtopic.php?f=6&t=320
>>
>>
>> On 04.03.2016 15:54, Niko Ehrenfeuchter wrote:
>>>
>>> we're constantly experiencing session timeouts in one of our Python
>>> scripts (see the traceback below).
>
> Just to be clear, here you mean a manually run script, not something you
> intend to have OMERO run in the background, right?

exactly, an "external" script using the OMERO Python bindings. It 
happens to run on the machine where OMERO is installed, but this is not 
a strict requirement. Just so it's clear we're not experiencing some 
network-link-delay vodoo or so.


>>> 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
>
> 600000 (or 10 min) should be the default:
> https://www.openmicroscopy.org/site/support/omero5.2/sysadmins/config.html#omero-sessions-timeout

I know, that's what caused my surprise. As it said 60000 (60'000) 
instead of 600000 (600'000) I thought it might be worth trying to set it 
*explicitly* to the documented default value.


>>> 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!
>
> I'll see if I can find anything that's been fixed since then, though
> it might also be worth upgrading (hint, hint). That being said, how

I know, really. We've been delayed for various reasons (new server 
hardware, new network components, new CentOS base deployment, Mondays, 
full moon, dwarves and so on), but it definitely is a top priority right 
now. Yet, I have to support our users with our current set-up ;-)

> are the sessions for the script runs being created? In the script
> itself? Or externally and passed via -k?

The sessions are established by the script during runtime. The relevant 
code is basically this:

> from omero.gateway import BlitzGateway
> su_conn = BlitzGateway(SU_USER, SU_PASS, host=HOST, port=PORT)
> conn = su_conn.suConn(username)
> do_the_real_work()
> conn._closeSession()

Am I doing something wrong here? Thinking about the su_conn session not 
being closed I went checking if there are tons of dangling 
root-sessions, but I can't find any so I'm guessing this is not the problem.

Cheers
Niko


More information about the ome-devel mailing list