[ome-users] Timeout for server-side scripts

Josh Moore josh at glencoesoftware.com
Fri Jan 21 09:21:43 GMT 2011


On Jan 20, 2011, at 10:33 AM, Mark Woodbridge wrote:
> On 20/01/11 07:07, Josh Moore wrote:
>> 
>> How are you running the script on the client?
>> 
> Sorry, should have been clearer. By invoking it on the command line (i.e. replacing the main method with one that creates a session in the normal way, rather than using the session passed by the container). This gives a time-out, as you'd expect, after 10 minutes.

That makes sense. There are at least two options. 1) to use your own main method you may want to set the configuration property omero.keep_alive. From etc/ice.config:

  # If keep_alive > 0, then every keep_alive seconds a call
  # will be made on the current session to keep it alive.
  # If no session is present, this is a no-op. Calling the
  # client.keepAlive() method will have the same effect as
  # setting this property.

  # omero.keep_alive=-1 (disabled by default)

You can do this via ICE_CONFIG or with the omero.client constructor:

  client = omero.client("localhost", ["--omero.keep_alive=120"])

or 

  client.enableKeepAlive(120)

2) you can use the script developer tools to launch your script by uploading the script and using bin/omero script serve to run your own processor.  That's the most realistic representation of how it will run on the server, with the primary negative that it will have to transfer the data to your machine.


> Running it client-side within Insight correctly displays the 'Too many open files' exception, in this case after about 15 minutes.
> 
> Thanks for your help.
> 
> Mark.

Gladly.
~Josh.


More information about the ome-users mailing list