[ome-devel] Freezes when reading data from OMERO using the API

Josh Moore josh at glencoesoftware.com
Wed Apr 13 12:43:53 BST 2011


On Apr 13, 2011, at 12:19 PM, Vanni Galli wrote:

> Dear All,

Hi Vanni,

> I have an OMERO installation on a virtual machine.
> 
> For the project I’m working on (the OMEGA project), I’m reading the images stored in OMERO using the API (in Java) and the Gateway.class present at http://trac.openmicroscopy.org.uk/ome/browser/insight/trunk/TEST/org/openmicroscopy/shoola/examples/data/Gateway.java?rev=7855.
> 
> For a specific image I select a channel and a “Z” and I load the bytes for each “T”:
> 
> for (int i = 0; i < framesNumber; i++)
> {
>  try
>  {
>    byte[] pixels = gateway.getPlane(pixelsID, 1, i, 1);
>    // send image to my algorithm
>  }
>  ...
> 
> My code is working and I’m able to correct read the bytes. The problem is that the reading of the images sometimes freeze, in a completely random way. 
> 
> Most of the time the loading works perfectly and in a few seconds I’m able to load all the images, but sometimes (I would say around the 10% of the times) the loading freeze for several seconds or minutes and then it restart. At the end of the loading the byte are correctly loaded, but with this freeze in the middle.
> 
> I have experienced this behavior also using OMERO.insight (on the same virtual machine): sometimes when I use the sliders (for the Z or T) the program freeze for some seconds.
> 
> Is this problem related to OMERO? Or am I using the API in a wrong way?

This is an issue of the test code (which is never very long running) leaking server memory:
http://trac.openmicroscopy.org.uk/ome/ticket/4953

I've committed a fix here:
http://git.openmicroscopy.org/?p=ome.git;a=commit;h=57970aba45367b5ecf4b3a78ccef14e104e838ad

Just fyi, any of the services which are returned by a method starting with "create" on ServiceFactoryPrx (or any instance of omero.api.StatefulServiceInterfacePrx) should have the close() method called on it when you are done.

If you could give that a try and let us know how things go, that'd be great.

Cheers,
~Josh

> Thank you very much for you help!
> 
> 
> These are the details about my virtual machine:
> 
> Linux isin09 2.6.18-194.17.1.el5xen #1 SMP Wed Sep 29 13:30:21 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
> CentOS release 5.5 (Final)
> 
> memory:
>                                total       used       free    shared    buffers   cached
> Mem:                       512        475         36       0             7             59
> -/+ buffers/cache:                 408         103
> Swap:                       1192      605         586
> 
> disk space:
> Filesystem           1K-blocks      Used Available Use% Mounted on
> /dev/xvda1             6940484   4174552   2407688  64% /
> /dev/xvda3            20641788   5621160  13971988  29% /home
> tmpfs                   262144         0    262144   0% /dev/shm
> 
> 
> -- 
> Scuola Universitaria Professionale della Svizzera Italiana
> Dipartimento Tecnologie Innovative
> Istituto Sistemi Informativi e Networking
> 
> Vanni Galli
> Ricercatore
> 
> Galleria 2
> CH - 6928 Manno
> 
> T +41 (0)58 666 65 92
> vanni.galli at supsi.ch
> www.supsi.ch/dti_______________________________________________
> 



More information about the ome-devel mailing list