repeated getPlane in matlab lead to "too many file opened"
Posted: Wed Jan 20, 2016 4:06 pm
Dear Omero developper,
I am using omero within home developped matlab code and since upgrade to 5.2 (and still now with 5.2.1) I get an error serverExceptionClass = "ome.conditions.ResourceError" message = "/OMERO/Pixels/Dir-195/195654 (Too many open files)" upon calling getPlane (see full message below). My code call this function repeatedly to go through all planes of long datasets (typiquelly 20 000 frames spread over several Image structured grouped in a dataset. Only one session is opened at the beginning and stored in a global var to be re-used.
ls /proc/19110/fd | wc -l reports ridiculously small number of opened files (535 for matlab and 4 for helper).
I cannot find anything suspicious in the Blitz.log of the server and no error for sure.
Do you have any clue about this issue. Should I close something after using a plane. Is there anything I can do to investigate this issue ?
Many thanks in advance for your help
Jacques
-----------------------
error reported at line 63 of getPlane
Java exception occurred:
omero.ResourceError
serverStackTrace = "ome.conditions.ResourceError: /OMERO/Pixels/Dir-195/195654 (Too many open files)
at ome.services.RawPixelsBean.handleException(RawPixelsBean.java:689)
at ome.services.RawPixelsBean.getPlane(RawPixelsBean.java:388)
at sun.reflect.GeneratedMethodAccessor759.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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 ome.security.basic.EventHandler.invoke(EventHandler.java:154)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at ome.tools.hibernate.SessionHandler.doStateful(SessionHandler.java:216)
at ome.tools.hibernate.SessionHandler.invoke(SessionHandler.java:200)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:108)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:249)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy104.getPlane(Unknown Source)
at sun.reflect.GeneratedMethodAccessor759.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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 ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:93)
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 com.sun.proxy.$Proxy104.getPlane(Unknown Source)
at sun.reflect.GeneratedMethodAccessor784.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at ome.services.blitz.util.IceMethodInvoker.invoke(IceMethodInvoker.java:172)
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:140)
at ome.services.blitz.impl.RawPixelsStoreI.getPlane_async(RawPixelsStoreI.java:102)
at sun.reflect.GeneratedMethodAccessor783.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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 com.sun.proxy.$Proxy105.getPlane_async(Unknown Source)
at omero.api._RawPixelsStoreTie.getPlane_async(_RawPixelsStoreTie.java:138)
at omero.api._RawPixelsStoreDisp.___getPlane(_RawPixelsStoreDisp.java:1001)
at omero.api._RawPixelsStoreDisp.__dispatch(_RawPixelsStoreDisp.java:1410)
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:745)
"
serverExceptionClass = "ome.conditions.ResourceError"
message = "/OMERO/Pixels/Dir-195/195654 (Too many open files)"
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at IceInternal.BasicStream.createUserException(BasicStream.java:2615)
at IceInternal.BasicStream.access$300(BasicStream.java:12)
at IceInternal.BasicStream$EncapsDecoder10.throwException(BasicStream.java:3099)
at IceInternal.BasicStream.throwException(BasicStream.java:2077)
at IceInternal.Outgoing.throwUserException(Outgoing.java:538)
at omero.api._RawPixelsStoreDelM.getPlane(_RawPixelsStoreDelM.java:609)
at omero.api.RawPixelsStorePrxHelper.getPlane(RawPixelsStorePrxHelper.java:2872)
at omero.api.RawPixelsStorePrxHelper.getPlane(RawPixelsStorePrxHelper.java:2836)
I am using omero within home developped matlab code and since upgrade to 5.2 (and still now with 5.2.1) I get an error serverExceptionClass = "ome.conditions.ResourceError" message = "/OMERO/Pixels/Dir-195/195654 (Too many open files)" upon calling getPlane (see full message below). My code call this function repeatedly to go through all planes of long datasets (typiquelly 20 000 frames spread over several Image structured grouped in a dataset. Only one session is opened at the beginning and stored in a global var to be re-used.
ls /proc/19110/fd | wc -l reports ridiculously small number of opened files (535 for matlab and 4 for helper).
I cannot find anything suspicious in the Blitz.log of the server and no error for sure.
Do you have any clue about this issue. Should I close something after using a plane. Is there anything I can do to investigate this issue ?
Many thanks in advance for your help
Jacques
-----------------------
error reported at line 63 of getPlane
Java exception occurred:
omero.ResourceError
serverStackTrace = "ome.conditions.ResourceError: /OMERO/Pixels/Dir-195/195654 (Too many open files)
at ome.services.RawPixelsBean.handleException(RawPixelsBean.java:689)
at ome.services.RawPixelsBean.getPlane(RawPixelsBean.java:388)
at sun.reflect.GeneratedMethodAccessor759.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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 ome.security.basic.EventHandler.invoke(EventHandler.java:154)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at ome.tools.hibernate.SessionHandler.doStateful(SessionHandler.java:216)
at ome.tools.hibernate.SessionHandler.invoke(SessionHandler.java:200)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:108)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:249)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy104.getPlane(Unknown Source)
at sun.reflect.GeneratedMethodAccessor759.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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 ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:93)
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 com.sun.proxy.$Proxy104.getPlane(Unknown Source)
at sun.reflect.GeneratedMethodAccessor784.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at ome.services.blitz.util.IceMethodInvoker.invoke(IceMethodInvoker.java:172)
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:140)
at ome.services.blitz.impl.RawPixelsStoreI.getPlane_async(RawPixelsStoreI.java:102)
at sun.reflect.GeneratedMethodAccessor783.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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 com.sun.proxy.$Proxy105.getPlane_async(Unknown Source)
at omero.api._RawPixelsStoreTie.getPlane_async(_RawPixelsStoreTie.java:138)
at omero.api._RawPixelsStoreDisp.___getPlane(_RawPixelsStoreDisp.java:1001)
at omero.api._RawPixelsStoreDisp.__dispatch(_RawPixelsStoreDisp.java:1410)
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:745)
"
serverExceptionClass = "ome.conditions.ResourceError"
message = "/OMERO/Pixels/Dir-195/195654 (Too many open files)"
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at IceInternal.BasicStream.createUserException(BasicStream.java:2615)
at IceInternal.BasicStream.access$300(BasicStream.java:12)
at IceInternal.BasicStream$EncapsDecoder10.throwException(BasicStream.java:3099)
at IceInternal.BasicStream.throwException(BasicStream.java:2077)
at IceInternal.Outgoing.throwUserException(Outgoing.java:538)
at omero.api._RawPixelsStoreDelM.getPlane(_RawPixelsStoreDelM.java:609)
at omero.api.RawPixelsStorePrxHelper.getPlane(RawPixelsStorePrxHelper.java:2872)
at omero.api.RawPixelsStorePrxHelper.getPlane(RawPixelsStorePrxHelper.java:2836)