Compression service not working

860 views
Skip to first unread message

stbender

unread,
Sep 18, 2013, 9:03:48 AM9/18/13
to dcm...@googlegroups.com
Hi,

I have the compression service activated to compress images with JPEG-LS lossless after 3 weeks:

ComputedRadiographyImageStorage:JLSL:3w
DigitalXRayImageStorageForPresentation:JLSL:3w
DigitalXRayImageStorageForProcessing:JLSL:3w
DigitalMammographyXRayImageStorageForPresentation:JLSL:3w
DigitalMammographyXRayImageStorageForProcessing:JLSL:3w
CTImageStorage:JLSL:3w
MRImageStorage:JLSL:3w
UltrasoundImageStorage:JLSL:3w
UltrasoundMultiframeImageStorage:JLSL:3w
UltrasoundImageStorageRetired:JLSL:3w
UltrasoundMultiframeImageStorageRetired:JLSL:3w
SecondaryCaptureImageStorage:JLSL:3w
XRayAngiographicImageStorage:JLSL:3w
XRayRadiofluoroscopicImageStorage:JLSL:3w
NuclearMedicineImageStorage:JLSL:3w


The service is configured to run outside of peak working hours:
TaskInterval: 10s!8-18

However, I can see there are lots of images older than 3 weeks that have the Transfer Syntax UID "1.2.840.10008.1.2", so they are not compressed.
The file sizes also tell me those images are uncompressed.

What can I do to get compression working?

Thank you!

stbender

unread,
Sep 18, 2013, 9:22:10 AM9/18/13
to dcm...@googlegroups.com
Hi again,

In the jmx console I manually invoked "checkForFilesToCompress", and after some time I got these errors in the logs.
It seems the system gets out of memory...

So now I have 2 questions:
- how can I configure the compresion service to work automatically?
- how can I compress all those old images (I have >35 million images in the DB!)

2013-09-18 15:14:06,785 WARN  -> (http-0.0.0.0-8080-5) [org.jboss.resource.connectionmanager.TxConnectionManager] Connection error occured: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@2ae7c7[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@11af0a0 handles=1 lastUse=1379509807053 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1abd056 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@fabffc xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1792ab2 txSync=null]
javax
.resource.spi.ResourceAdapterInternalException: Unexpected error
        at org
.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.broadcastConnectionError(BaseWrapperManagedConnection.java:393)
        at org
.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.connectionError(BaseWrapperManagedConnection.java:370)
        at org
.jboss.resource.adapter.jdbc.WrappedConnection.checkException(WrappedConnection.java:865)
        at org
.jboss.resource.adapter.jdbc.WrappedStatement.checkException(WrappedStatement.java:852)
        at org
.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:347)
        at org
.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:243)
        at org
.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:144)
        at org
.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntitiesCommand.execute(JDBCFindEntitiesCommand.java:54)
        at org
.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntities(JDBCStoreManager.java:613)
        at org
.jboss.ejb.plugins.CMPPersistenceManager.findEntities(CMPPersistenceManager.java:337)
        at org
.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntities(CachedConnectionInterceptor.java:242)
        at org
.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:662)
        at sun
.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
        at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java
.lang.reflect.Method.invoke(Method.java:597)
        at org
.jboss.invocation.Invocation.performCall(Invocation.java:359)
        at org
.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1126)
        at org
.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
        at org
.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:203)
        at org
.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:189)
        at org
.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
        at org
.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:136)
        at org
.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:76)
        at org
.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:45)
        at org
.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)
        at org
.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)
        at org
.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:378)
        at org
.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:161)
        at org
.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:145)
        at org
.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132)
        at org
.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
        at org
.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:521)
        at org
.jboss.ejb.Container.invoke(Container.java:981)
        at org
.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:359)
        at org
.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:133)
        at $Proxy146
.findFilesToCompress(Unknown Source)
        at org
.dcm4chex.archive.ejb.session.FileSystemMgt2Bean.findFilesToCompress(FileSystemMgt2Bean.java:1055)
        at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java
.lang.reflect.Method.invoke(Method.java:597)
        at org
.jboss.invocation.Invocation.performCall(Invocation.java:359)
        at org
.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
        at org
.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
        at org
.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
        at org
.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
        at org
.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
        at org
.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
        at org
.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
        at org
.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
        at org
.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
        at org
.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
        at org
.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
        at org
.jboss.ejb.Container.invoke(Container.java:960)
        at sun
.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
        at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java
.lang.reflect.Method.invoke(Method.java:597)
        at org
.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
        at org
.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org
.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at org
.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org
.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org
.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
        at org
.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
        at org
.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
        at org
.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
        at org
.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
        at org
.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
        at org
.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
        at org
.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
        at $Proxy254
.findFilesToCompress(Unknown Source)
        at org
.dcm4chex.archive.mbean.CompressionService.checkForFilesToCompress(CompressionService.java:355)
        at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java
.lang.reflect.Method.invoke(Method.java:597)
        at org
.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
        at org
.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org
.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
        at org
.jboss.mx.server.Invocation.invoke(Invocation.java:88)
        at org
.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
        at org
.jboss.mx.server.Invocation.invoke(Invocation.java:88)
        at org
.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org
.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org
.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:258)
        at org
.jboss.jmx.adaptor.control.Server.invokeOp(Server.java:223)
        at org
.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOp(HtmlAdaptorServlet.java:278)
        at org
.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:100)
        at org
.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServlet.java:82)
        at javax
.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at javax
.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org
.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org
.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org
.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at org
.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org
.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org
.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at org
.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org
.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
        at org
.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
        at org
.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
        at org
.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org
.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org
.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
        at org
.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:420)
        at org
.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org
.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
        at org
.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org
.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org
.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
        at java
.lang.Thread.run(Thread.java:662)
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
2013-09-18 15:14:06,791 ERROR -> (Timer-0) [STDERR] java.lang.OutOfMemoryError: Java heap space
2013-09-18 15:14:06,794 ERROR -> (Timer-0) [STDERR]     at org.jboss.net.protocol.resource.Handler.openConnection(Handler.java:43)
2013-09-18 15:14:06,794 ERROR -> (Timer-0) [STDERR]     at java.net.URL.openConnection(URL.java:945)
2013-09-18 15:14:06,794 ERROR -> (Timer-0) [STDERR]     at org.jboss.logging.Log4jService$URLWatchTimerTask.run(Log4jService.java:569)
2013-09-18 15:14:06,794 ERROR -> (Timer-0) [STDERR]     at java.util.TimerThread.mainLoop(Timer.java:512)
2013-09-18 15:14:06,794 ERROR -> (Timer-0) [STDERR]     at java.util.TimerThread.run(Timer.java:462)
2013-09-18 15:14:06,794 ERROR -> (DefaultQuartzScheduler_QuartzSchedulerThread) [STDERR] Exception in thread "DefaultQuartzScheduler_QuartzSchedulerThread"
2013-09-18 15:14:06,794 ERROR -> (DefaultQuartzScheduler_QuartzSchedulerThread) [STDERR] java.lang.OutOfMemoryError: Java heap space
2013-09-18 15:14:06,795 ERROR -> (SubscriptionWatchDog) [STDERR] Exception in thread "SubscriptionWatchDog"
2013-09-18 15:14:06,795 ERROR -> (SubscriptionWatchDog) [STDERR] java.lang.OutOfMemoryError: Java heap space
2013-09-18 15:14:06,795 ERROR -> (SubscriptionWatchDog) [STDERR]        at java.util.concurrent.ConcurrentHashMap$Values.iterator(ConcurrentHashMap.java:1187)
2013-09-18 15:14:06,795 ERROR -> (SubscriptionWatchDog) [STDERR]        at org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager$WatchDog.run(SubscriptionManager.java:639)
2013-09-18 15:14:06,795 ERROR -> (SubscriptionWatchDog) [STDERR]        at java.lang.Thread.run(Thread.java:662)
2013-09-18 15:14:06,795 ERROR -> (ScannerThread) [STDERR] Exception in thread "ScannerThread"
2013-09-18 15:14:06,795 ERROR -> (ScannerThread) [STDERR] java.lang.OutOfMemoryError: GC overhead limit exceeded
2013-09-18 15:14:06,796 ERROR -> (Thread-5) [STDERR] Exception in thread "Thread-5"
2013-09-18 15:14:06,796 ERROR -> (Thread-5) [STDERR] java.lang.OutOfMemoryError: GC overhead limit exceeded
2013-09-18 15:14:06,796 ERROR -> (Memory monitor thread of "jboss.monitor:service=MemoryMonitor") [STDERR] Exception in thread "Memory monitor thread of "jboss.monitor:service=MemoryMonitor""
2013-09-18 15:14:06,796 ERROR -> (Memory monitor thread of "jboss.monitor:service=MemoryMonitor") [STDERR] java.lang.OutOfMemoryError: Java heap space
2013-09-18 15:14:06,801 ERROR -> (http-0.0.0.0-8080-5) [org.jboss.ejb.plugins.cmp.jdbc.JDBCJBossQLQuery.File#findFilesToCompress] Find failed
org
.jboss.util.NestedSQLException: Error; - nested throwable: (java.lang.OutOfMemoryError: GC overhead limit exceeded)
        at org
.jboss.resource.adapter.jdbc.WrappedConnection.checkException(WrappedConnection.java:873)
        at org
.jboss.resource.adapter.jdbc.WrappedStatement.checkException(WrappedStatement.java:852)
        at org
.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:347)
        at org
.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:243)
        at org
.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:144)
        at org
.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntitiesCommand.execute(JDBCFindEntitiesCommand.java:54)
        at org
.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntities(JDBCStoreManager.java:613)
        at org
.jboss.ejb.plugins.CMPPersistenceManager.findEntities(CMPPersistenceManager.java:337)
        at org
.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntities(CachedConnectionInterceptor.java:242)
        at org
.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:662)
        at sun
.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
        at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java
.lang.reflect.Method.invoke(Method.java:597)
        at org
.jboss.invocation.Invocation.performCall(Invocation.java:359)
        at org
.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1126)
        at org
.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
        at org
.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:203)
        at org
.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:189)
        at org
.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
        at org
.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:136)
        at org
.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:76)
        at org
.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:45)
        at org
.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)
        at org
.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)
        at org
.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:378)
        at org
.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:161)
        at org
.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:145)
        at org
.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132)
        at org
.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
        at org
.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:521)
        at org
.jboss.ejb.Container.invoke(Container.java:981)
        at org
.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:359)
        at org
.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:133)
        at $Proxy146
.findFilesToCompress(Unknown Source)
        at org
.dcm4chex.archive.ejb.session.FileSystemMgt2Bean.findFilesToCompress(FileSystemMgt2Bean.java:1055)
        at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java
.lang.reflect.Method.invoke(Method.java:597)
        at org
.jboss.invocation.Invocation.performCall(Invocation.java:359)
        at org
.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
        at org
.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
        at org
.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
        at org
.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
        at org
.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
        at org
.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
        at org
.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
        at org
.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
        at org
.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
        at org
.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
        at org
.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
        at org
.jboss.ejb.Container.invoke(Container.java:960)
        at sun
.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
        at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java
.lang.reflect.Method.invoke(Method.java:597)
        at org
.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
        at org
.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org
.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at org
.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org
.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org
.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
        at org
.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
        at org
.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
        at org
.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
        at org
.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
        at org
.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
        at org
.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
        at org
.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
        at $Proxy254
.findFilesToCompress(Unknown Source)
        at org
.dcm4chex.archive.mbean.CompressionService.checkForFilesToCompress(CompressionService.java:355)
        at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java
.lang.reflect.Method.invoke(Method.java:597)
        at org
.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
        at org
.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org
.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
        at org
.jboss.mx.server.Invocation.invoke(Invocation.java:88)
        at org
.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
        at org
.jboss.mx.server.Invocation.invoke(Invocation.java:88)
        at org
.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org
.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org
.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:258)
        at org
.jboss.jmx.adaptor.control.Server.invokeOp(Server.java:223)
        at org
.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOp(HtmlAdaptorServlet.java:278)
        at org
.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:100)
        at org
.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServlet.java:82)
        at javax
.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at javax
.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org
.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org
.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org
.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at org
.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org
.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org
.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at org
.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org
.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
        at org
.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
        at org
.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
        at org
.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org
.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org
.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
        at org
.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:420)
        at org
.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org
.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
        at org
.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org
.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org
.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
        at java
.lang.Thread.run(Thread.java:662)
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
2013-09-18 15:14:06,804 ERROR -> (http-0.0.0.0-8080-5) [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackException in method: public abstract org.dcm4chex.archive.ejb.interfaces.FileDTO[] org.dcm4chex.archive.ejb.interfaces.FileSystemMgt2.findFilesToCompress(org.dcm4chex.archive.ejb.interfaces.FileSystemDTO,java.lang.String,java.sql.Timestamp,int) throws javax.ejb.FinderException,java.rmi.RemoteException, causedBy:
javax
.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
        at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commit(TransactionImple.java:255)
        at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:501)
        at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:361)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
        at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
        at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
        at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
        at org.jboss.ejb.Container.invoke(Container.java:960)
        at sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
        at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
        at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
        at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
        at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
        at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
        at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
        at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
        at $Proxy254.findFilesToCompress(Unknown Source)
        at org.dcm4chex.archive.mbean.CompressionService.checkForFilesToCompress(CompressionService.java:355)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
        at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:258)
        at org.jboss.jmx.adaptor.control.Server.invokeOp(Server.java:223)
        at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOp(HtmlAdaptorServlet.java:278)
        at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:100)
        at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServlet.java:82)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
        at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:420)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
        at java.lang.Thread.run(Thread.java:662)
2013-09-18 15:14:06,805 ERROR -> (http-0.0.0.0-8080-5) [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/jmx-console].[HtmlAdaptor]] Servlet.service() for servlet HtmlAdaptor threw exception
javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can'
t commit because the transaction is in aborted state
        at com
.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commit(TransactionImple.java:255)
        at org
.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:501)
        at org
.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:361)
        at org
.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
        at org
.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
        at org
.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
        at org
.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
        at org
.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
        at org
.jboss.ejb.Container.invoke(Container.java:960)
        at sun
.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
        at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java
.lang.reflect.Method.invoke(Method.java:597)
        at org
.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
        at org
.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org
.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at org
.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org
.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org
.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
        at org
.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
        at org
.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
        at org
.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
        at org
.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
        at org
.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
        at org
.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
        at org
.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
        at $Proxy254
.findFilesToCompress(Unknown Source)
        at org
.dcm4chex.archive.mbean.CompressionService.checkForFilesToCompress(CompressionService.java:355)
        at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java
.lang.reflect.Method.invoke(Method.java:597)
        at org
.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
        at org
.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org
.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
        at org
.jboss.mx.server.Invocation.invoke(Invocation.java:88)
        at org
.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
        at org
.jboss.mx.server.Invocation.invoke(Invocation.java:88)
        at org
.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org
.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org
.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:258)
        at org
.jboss.jmx.adaptor.control.Server.invokeOp(Server.java:223)
        at org
.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOp(HtmlAdaptorServlet.java:278)
        at org
.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:100)
        at org
.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServlet.java:82)
        at javax
.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at javax
.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org
.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org
.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org
.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at org
.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org
.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org
.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at org
.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org
.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
        at org
.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
        at org
.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
        at org
.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org
.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org
.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
        at org
.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:420)
        at org
.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org
.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
        at org
.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org
.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org
.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
        at java
.lang.Thread.run(Thread.java:662)





stbender

unread,
Sep 18, 2013, 11:41:26 AM9/18/13
to dcm...@googlegroups.com
I tried increasing the heap limit to 3GB in bin/run.conf:

if [ "x$JAVA_OPTS" = "x" ]; then
   JAVA_OPTS
="-Xms128m -Xmx3g -XX:MaxPermSize=128m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
fi

I restarted and tried again but I still get the same error message (heap error)..

stbender

unread,
Sep 19, 2013, 4:22:02 AM9/19/13
to dcm...@googlegroups.com
it seems like the compression service starts when dcm4chee is started, then it throws an out-of-memory error. Then I get "checkForFilesToCompress is aleardy running" messages every 10 seconds for sime time, then the compression service gives up.

Is there a way to call the compression function from the command line?
I could write a script that walks through the images' folders and calls a command. However, I want to make sure the compressed images do not get re-compressed and that I do not get inconsistencies in the DB (should DB entries be updated?)

Any help would be appreciated!

stbender

unread,
Sep 20, 2013, 7:59:09 AM9/20/13
to dcm...@googlegroups.com
ok, I managed to run compress() on a sample image (CT image from August 1st 2013):

/opt/dcm4chee/bin/twiddle.sh -uadmin -ppass -s jnp://localhost:1099 invoke "dcm4chee.archive:service=CompressionService" compress /mnt/images/2013/8/1/23/FF9AE1D0/49B7623F/49B76240

However, I do not get any output on the console or the server.log. The file size does not change, dcm4chee-web still shows me the Transfer Syntax UID "1.2.840.10008.1.2".

Is there a way to find out why compress() does not compress?

stbender

unread,
Sep 20, 2013, 9:28:13 AM9/20/13
to
I tried invoking compress() from the web interface with the file path&name or the SOP Instance UID as parameter, but I get this error in the log:

2013-09-20 15:20:46,660 ERROR -> (http-0.0.0.0-8080-15) [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/jmx-console].[HtmlAdaptor]] Servlet.service() for servlet HtmlAdaptor threw exception
javax
.management.IntrospectionException: Failed to find PropertyEditor for type: org.dcm4chex.archive.ejb.interfaces.FileDTO
        at org
.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:251)

Alvaro G. [Andor]

unread,
Oct 3, 2013, 10:17:45 AM10/3/13
to dcm...@googlegroups.com
This is also bothering me...

What is is exactly that FileDTO reference we have to enter there? I don't know how to compress an individual study or instance...

El 20/09/13 15:23, stbender escribió:
I tried invoking compress() from the web interface with the file path&name as parameter, but I git this error in the log:
--
You received this message because you are subscribed to the Google Groups "dcm4che" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+u...@googlegroups.com.
To post to this group, send email to dcm...@googlegroups.com.
Visit this group at http://groups.google.com/group/dcm4che.
For more options, visit https://groups.google.com/groups/opt_out.

Message has been deleted

stbender

unread,
Oct 14, 2013, 5:56:14 AM10/14/13
to dcm...@googlegroups.com
Hi,

as I was not able to compress the images, I wrote a script to extract the uncompressed images to a temp dir, delete the studies and re-send the images.
I now set the option to compress the images on the fly on reception, so I do not need the crashing compressionService anymore.

However, I still would like to know how to invoke the compress() routine manually...

Here's the script, it might be useful for others:
#!/bin/sh

# Script by Stephan Bender
# This script re-sends all images of studies containing uncompressed images.
# It uses the storescu command in the dcm4che toolkit.
# Make sure the below variables suit your system and adjust your database login
# in the 2 mysql commands.
# I recommend watching the script output and the dcm4chee server.log when the script
# starts, so any errors (e.g. wrong pathes or parameters) can be corrected.
# Warning: If the sending of images fails (e.g. because the dcm4chee server rejects the
# association because it does not "know" the calling AET), data loss will occur!

studyfile
="uid_list.txt"
filelist
="filelist.txt"
tempdir
="tmp"

twiddle
="/opt/dcm4chee/bin/twiddle.sh"
dcmsnd
="/home/radswz/dcm4che-3.2.1/bin/storescu"
archiveroot
="/mnt/images" # where does dcm4chee store its images

# Give the DICOM connection parameters to send the images
AET
="BACKUPPACS"
host
="127.0.0.1"
port
="11112"

# Backup the value of the internal field separator, set the IFS to "new line"
OIFS
=$IFS
IFS
=$'\n'

# Query for all studies that contain uncompressed images with
# transfersyntax 1.2.840.10008.1.2 (implicit little endian)
# store the resulting list of UIDs to a text file
# This may include images that are already compressed,
# if a study contains both compressed and uncompressed images
echo
"Querying the StudyUIDs from the DB..."
mysql
--batch --skip-column-names -upacs -ppacs pacsdb -e "SELECT study.study_iuid FROM series join study on series.study_fk = study.pk join patient on study.patient_fk = patient.pk join instance on instance.series_fk = series.pk join files on instance.pk = files.instance_fk WHERE files.file_tsuid = '1.2.840.10008.1.2' group by study.study_iuid;" > $studyfile

# For each study UID in the file, query the db for the file names of the images,
# store those file names to a text file
totallines
=`cat $studyfile | wc -l`
currentline
=0
for i in $(cat $studyfile); do
   
(( currentline++ ))
    echo
"-------------------------------------------------------------------------------"
    echo
"Processing study "$currentline" of "$totallines"..."
    echo
"-------------------------------------------------------------------------------"

    echo
"Querying the image files from the DB for StudyUID "$i"..."
    mysql
--batch --skip-column-names -upacs -ppacs pacsdb -e "SELECT files.filepath FROM series join study on series.study_fk = study.pk join patient on study.patient_fk = patient.pk join instance on instance.series_fk = series.pk join files on instance.pk = files.instance_fk WHERE study.study_iuid = '$i';" > $filelist
   
   
# Copy each file to the temp directory
    echo
"Copying the image files to the temp dir..."
   
for n in $(cat $filelist); do
        cp $archiveroot
/$n $tempdir/
   
done
   
   
# Delete the study with the given UID from the dcm4chee server
    echo
"Deleting study with UID "$i" ..."
    $twiddle
-uadmin -p<pass> -s jnp://localhost:1099 invoke "dcm4chee.archive:service=ContentEditService" purgeStudy $i

   
# Re-send the images in the temp directory to the dcm4chee server
    echo
"Sending the files to the server..."
    $dcmsnd
-c $AET@$host:$port $tempdir

   
# Delete the images from the tmp directory
    echo
"Removing the files from the temp dir..."
    rm $tempdir
/*

    # Wait 1 second to allow a clean interrupt
    echo "Waiting 1 second: Press Ctrl+C now if you want to interrupt the script"
    sleep 1
    echo "No termination signal given. Going on..."

done

# restore the IFS
IFS=$OIFS

Docjay

unread,
Apr 8, 2015, 3:12:32 PM4/8/15
to dcm...@googlegroups.com
I know this is an old post -

How large is your database?  Mine would not compress either (using MYSQL) because it was so large.  I ended up adding a compound index to the files table and queries went from taking 900s to around 14s.  After that, it was compressing everything it could find.
...

Matthew Gutierrez

unread,
Jan 21, 2016, 11:07:57 AM1/21/16
to dcm4che
Hi Docjay, can you advise on adding a compound index to MySQL?  What was the query syntax?

Matthew Gutierrez

unread,
Jan 12, 2017, 1:18:57 PM1/12/17
to dcm4che
Would the create-index.mysql solve this?


On Wednesday, April 8, 2015 at 3:12:32 PM UTC-4, Docjay wrote:
Reply all
Reply to author
Forward
0 new messages